Class MultiMutationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.couchbase.client.core.CouchbaseException
-
- com.couchbase.client.java.error.subdoc.SubDocumentException
-
- com.couchbase.client.java.error.subdoc.MultiMutationException
-
- All Implemented Interfaces:
Serializable
@Committed @Public public class MultiMutationException extends SubDocumentException
Exception denoting that at least one error occurred when applying multiple mutations using the sub-document API (aMutateInBuilder.execute()
with at least two mutations). None of the mutations were applied.- Since:
- 2.2
- Author:
- Simon Baslé
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MultiMutationException(int index, ResponseStatus errorStatus, List<MutationSpec> originalSpec, CouchbaseException errorException)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
firstFailureIndex()
MutationSpec
firstFailureSpec()
ResponseStatus
firstFailureStatus()
List<MutationSpec>
originalSpec()
-
Methods inherited from class com.couchbase.client.core.CouchbaseException
details, details, getMessage
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
MultiMutationException
public MultiMutationException(int index, ResponseStatus errorStatus, List<MutationSpec> originalSpec, CouchbaseException errorException)
-
-
Method Detail
-
firstFailureIndex
public int firstFailureIndex()
- Returns:
- the zero-based index of the first mutation spec that caused the multi mutation to fail.
-
firstFailureStatus
public ResponseStatus firstFailureStatus()
- Returns:
- the error status for the first mutation spec that caused the multi mutation to fail.
-
originalSpec
public List<MutationSpec> originalSpec()
- Returns:
- the list of
MutationSpec
that was originally passed to the multi-mutation operation.
-
firstFailureSpec
public MutationSpec firstFailureSpec()
- Returns:
- the mutation spec in
originalSpec()
at indexfirstFailureIndex()
.
-
-