@InterfaceStability.Uncommitted @InterfaceAudience.Private public class SubdocHelper extends Object
Helper class to the subdocument API.
Constructor and Description |
---|
SubdocHelper() |
Modifier and Type | Method and Description |
---|---|
static CouchbaseException |
commonSubdocErrors(ResponseStatus status,
String id,
String path)
Convert status that can happen in a subdocument context to corresponding exceptions.
|
static boolean |
isSubdocLevelError(ResponseStatus responseStatus)
Check whether a
ResponseStatus is subdocument-level or not. |
public static CouchbaseException commonSubdocErrors(ResponseStatus status, String id, String path)
Convert status that can happen in a subdocument context to corresponding exceptions. Other status just become a CouchbaseException
.
public static boolean isSubdocLevelError(ResponseStatus responseStatus)
Check whether a ResponseStatus
is subdocument-level or not. That is to say an error code which, if received in the context of a multi-operation, would not prevent the successful execution of other operations in that packet.
For instance, ResponseStatus.SUBDOC_PATH_NOT_FOUND
is a subdoc error code that would not prevent the execution of other operations whereas ResponseStatus.NOT_EXISTS
is a document access error code and would inherently invalidate any other operation within the theoretical packet.
responseStatus
- the status code to check.Copyright © 2015 Couchbase, Inc.