Package com.couchbase.client.java.kv
Enum GetAccessor
- java.lang.Object
-
- java.lang.Enum<GetAccessor>
-
- com.couchbase.client.java.kv.GetAccessor
-
- All Implemented Interfaces:
Serializable
,Comparable<GetAccessor>
@Internal public enum GetAccessor extends Enum<GetAccessor>
-
-
Field Summary
Fields Modifier and Type Field Description static String
EXPIRATION_MACRO
Constant for the subdocument expiration macro.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CompletableFuture<GetResult>
get(Core core, String id, GetRequest request, Transcoder transcoder)
Takes aGetRequest
and dispatches, converts and returns the result.static CompletableFuture<GetResult>
getAndLock(Core core, String id, GetAndLockRequest request, Transcoder transcoder)
static CompletableFuture<GetResult>
getAndTouch(Core core, String id, GetAndTouchRequest request, Transcoder transcoder)
static CompletableFuture<GetResult>
subdocGet(Core core, String id, SubdocGetRequest request, Transcoder transcoder)
static GetAccessor
valueOf(String name)
Returns the enum constant of this type with the specified name.static GetAccessor[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Field Detail
-
EXPIRATION_MACRO
public static final String EXPIRATION_MACRO
Constant for the subdocument expiration macro.- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static GetAccessor[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GetAccessor c : GetAccessor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GetAccessor valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
get
public static CompletableFuture<GetResult> get(Core core, String id, GetRequest request, Transcoder transcoder)
Takes aGetRequest
and dispatches, converts and returns the result.- Parameters:
core
- the core reference to dispatch into.id
- the document id to fetch.request
- the request to dispatch and convert once a response arrives.- Returns:
- a
CompletableFuture
once the document is fetched and decoded.
-
getAndLock
public static CompletableFuture<GetResult> getAndLock(Core core, String id, GetAndLockRequest request, Transcoder transcoder)
-
getAndTouch
public static CompletableFuture<GetResult> getAndTouch(Core core, String id, GetAndTouchRequest request, Transcoder transcoder)
-
subdocGet
public static CompletableFuture<GetResult> subdocGet(Core core, String id, SubdocGetRequest request, Transcoder transcoder)
-
-