@InterfaceStability.Experimental @InterfaceAudience.Public public class MultiMutationResponse extends AbstractKeyValueResponse
The response for a BinarySubdocMultiMutationRequest.
| Constructor and Description |
|---|
MultiMutationResponse(ResponseStatus status,
short serverStatusCode,
String bucket,
BinarySubdocMultiMutationRequest request,
long cas,
MutationToken mutationToken)
Creates a unsuccessful
MultiMutationResponse. |
MultiMutationResponse(ResponseStatus status,
short serverStatusCode,
String bucket,
int firstErrorIndex,
short firstErrorStatusCode,
BinarySubdocMultiMutationRequest request,
long cas,
MutationToken mutationToken)
Creates a partially successful
MultiMutationResponse. |
MultiMutationResponse(String bucket,
BinarySubdocMultiMutationRequest request,
long cas,
MutationToken token)
Creates an successful
MultiMutationResponse. |
| Modifier and Type | Method and Description |
|---|---|
long |
cas() |
int |
firstErrorIndex() |
ResponseStatus |
firstErrorStatus() |
MutationToken |
mutationToken() |
BinarySubdocMultiMutationRequest |
request()
Stub method implementation which needs to be overriden by all responses that support cloning.
|
bucket, content, refCnt, release, release, retain, retain, serverStatusCode, toStringcreationTime, statusclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitstatuscreationTimepublic MultiMutationResponse(ResponseStatus status, short serverStatusCode, String bucket, int firstErrorIndex, short firstErrorStatusCode, BinarySubdocMultiMutationRequest request, long cas, MutationToken mutationToken)
Creates a partially successful MultiMutationResponse. The status, expected to be ResponseStatus.SUBDOC_MULTI_PATH_FAILURE, denotes that at least one MutationCommand failed.
status - the status of the request (SUBDOC_MULTI_PATH_FAILURE).serverStatusCode - the status code of the whole request.bucket - the bucket on which the request happened.firstErrorIndex - the zero-based index of the first MutationCommand that failed (in case failure is due to one or more commands).firstErrorStatusCode - the status code for the first MutationCommand that failed (in case failure is due to one or more commands).request - the original BinarySubdocMultiMutationRequest.cas - the CAS value of the document after mutations.mutationToken - the MutationToken of the document after mutations, if available. Null otherwise.public MultiMutationResponse(ResponseStatus status, short serverStatusCode, String bucket, BinarySubdocMultiMutationRequest request, long cas, MutationToken mutationToken)
Creates a unsuccessful MultiMutationResponse.
First error index is set to -1 and first error status is set to ResponseStatus.FAILURE.
status - the failed status of the request.serverStatusCode - the status code of the whole request.bucket - the bucket on which the request happened.request - the original BinarySubdocMultiMutationRequest.cas - the CAS value of the document after mutations.mutationToken - the MutationToken of the document after mutations, if available. Null otherwise.public MultiMutationResponse(String bucket, BinarySubdocMultiMutationRequest request, long cas, MutationToken token)
Creates an successful MultiMutationResponse.
bucket - the bucket on which the request happened.request - the original BinarySubdocMultiMutationRequest.cas - the CAS value of the document after mutations.token - the MutationToken of the document after mutations, if available. Null otherwise.public BinarySubdocMultiMutationRequest request()
AbstractCouchbaseResponseStub method implementation which needs to be overriden by all responses that support cloning.
request in interface CouchbaseResponserequest in class AbstractCouchbaseResponsepublic long cas()
public MutationToken mutationToken()
MutationToken corresponding to a mutation of the document, if it was mutated and tokens are activated.public int firstErrorIndex()
MutationCommand that failed, or -1 if none failed or the whole request failed due to another factor (eg. key doesn’t exist).public ResponseStatus firstErrorStatus()
ResponseStatus of the first MutationCommand that failed, ResponseStatus.SUCCESS if none failed or ResponseStatus.FAILURE if the whole request failed due to another factor (eg. key doesn’t exist).Copyright © 2016 Couchbase, Inc.. All rights reserved.