Class ClassicCoreKvBinaryOps
- java.lang.Object
-
- com.couchbase.client.core.classic.kv.ClassicCoreKvBinaryOps
-
- All Implemented Interfaces:
CoreKvBinaryOps
@Internal public class ClassicCoreKvBinaryOps extends Object implements CoreKvBinaryOps
-
-
Constructor Summary
Constructors Constructor Description ClassicCoreKvBinaryOps(Core core, CoreKeyspace keyspace)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CoreAsyncResponse<CoreMutationResult>appendAsync(String id, byte[] content, CoreCommonOptions options, long cas, CoreDurability durability)Appends binary content to the document with custom options.CoreAsyncResponse<CoreCounterResult>decrementAsync(String id, CoreCommonOptions options, long expiry, long delta, Optional<Long> initial, CoreDurability durability)Decrements the counter document by one or the number defined in the options.CoreAsyncResponse<CoreCounterResult>incrementAsync(String id, CoreCommonOptions options, long expiry, long delta, Optional<Long> initial, CoreDurability durability)Increments the counter document by one or the number defined in the options.CoreAsyncResponse<CoreMutationResult>prependAsync(String id, byte[] content, CoreCommonOptions options, long cas, CoreDurability durability)Prepends binary content to the document with custom options.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.couchbase.client.core.api.kv.CoreKvBinaryOps
appendBlocking, appendReactive, decrementBlocking, decrementReactive, incrementBlocking, incrementReactive, prependBlocking, prependReactive
-
-
-
-
Constructor Detail
-
ClassicCoreKvBinaryOps
public ClassicCoreKvBinaryOps(Core core, CoreKeyspace keyspace)
-
-
Method Detail
-
appendAsync
public CoreAsyncResponse<CoreMutationResult> appendAsync(String id, byte[] content, CoreCommonOptions options, long cas, CoreDurability durability)
Appends binary content to the document with custom options.- Specified by:
appendAsyncin interfaceCoreKvBinaryOps- Parameters:
id- the document id which is used to uniquely identify it.content- the binary content to append to the document.options- custom options to customize the append behavior.- Returns:
- a
CoreMutationResultonce completed. - Throws:
DocumentNotFoundException- the given document id is not found in the collection.CasMismatchException- if the document has been concurrently modified on the server.TimeoutException- if the operation times out before getting a result.CouchbaseException- for all other error reasons (acts as a base type and catch-all).
-
prependAsync
public CoreAsyncResponse<CoreMutationResult> prependAsync(String id, byte[] content, CoreCommonOptions options, long cas, CoreDurability durability)
Prepends binary content to the document with custom options.- Specified by:
prependAsyncin interfaceCoreKvBinaryOps- Parameters:
id- the document id which is used to uniquely identify it.content- the binary content to append to the document.options- custom options to customize the prepend behavior.- Returns:
- a
CoreMutationResultonce completed. - Throws:
DocumentNotFoundException- the given document id is not found in the collection.CasMismatchException- if the document has been concurrently modified on the server.TimeoutException- if the operation times out before getting a result.CouchbaseException- for all other error reasons (acts as a base type and catch-all).
-
incrementAsync
public CoreAsyncResponse<CoreCounterResult> incrementAsync(String id, CoreCommonOptions options, long expiry, long delta, Optional<Long> initial, CoreDurability durability)
Increments the counter document by one or the number defined in the options.- Specified by:
incrementAsyncin interfaceCoreKvBinaryOps- Parameters:
id- the document id which is used to uniquely identify it.options- custom options to customize the increment behavior.- Returns:
- a
CoreCounterResultonce completed. - Throws:
DocumentNotFoundException- the given document id is not found in the collection.TimeoutException- if the operation times out before getting a result.CouchbaseException- for all other error reasons (acts as a base type and catch-all).
-
decrementAsync
public CoreAsyncResponse<CoreCounterResult> decrementAsync(String id, CoreCommonOptions options, long expiry, long delta, Optional<Long> initial, CoreDurability durability)
Decrements the counter document by one or the number defined in the options.- Specified by:
decrementAsyncin interfaceCoreKvBinaryOps- Parameters:
id- the document id which is used to uniquely identify it.options- custom options to customize the decrement behavior.- Returns:
- a
CoreCounterResultonce completed. - Throws:
DocumentNotFoundException- the given document id is not found in the collection.TimeoutException- if the operation times out before getting a result.CouchbaseException- for all other error reasons (acts as a base type and catch-all).
-
-