public class AsyncBinaryCollection extends Object
Modifier and Type | Method and Description |
---|---|
CompletableFuture<MutationResult> |
append(String id,
byte[] content)
Appends binary content to the document.
|
CompletableFuture<MutationResult> |
append(String id,
byte[] content,
AppendOptions options)
Appends binary content to the document with custom options.
|
CompletableFuture<CounterResult> |
decrement(String id)
Decrements the counter document by one.
|
CompletableFuture<CounterResult> |
decrement(String id,
DecrementOptions options)
Decrements the counter document by one or the number defined in the options.
|
CompletableFuture<CounterResult> |
increment(String id)
Increments the counter document by one.
|
CompletableFuture<CounterResult> |
increment(String id,
IncrementOptions options)
Increments the counter document by one or the number defined in the options.
|
CompletableFuture<MutationResult> |
prepend(String id,
byte[] content)
Prepends binary content to the document.
|
CompletableFuture<MutationResult> |
prepend(String id,
byte[] content,
PrependOptions options)
Prepends binary content to the document with custom options.
|
public CompletableFuture<MutationResult> append(String id, byte[] content)
id
- the document id which is used to uniquely identify it.content
- the binary content to append to the document.MutationResult
once completed.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).public CompletableFuture<MutationResult> append(String id, byte[] content, AppendOptions options)
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.MutationResult
once completed.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).public CompletableFuture<MutationResult> prepend(String id, byte[] content)
id
- the document id which is used to uniquely identify it.content
- the binary content to append to the document.MutationResult
once completed.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).public CompletableFuture<MutationResult> prepend(String id, byte[] content, PrependOptions options)
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.MutationResult
once completed.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).public CompletableFuture<CounterResult> increment(String id)
id
- the document id which is used to uniquely identify it.CounterResult
once completed.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).public CompletableFuture<CounterResult> increment(String id, IncrementOptions options)
id
- the document id which is used to uniquely identify it.options
- custom options to customize the increment behavior.CounterResult
once completed.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).public CompletableFuture<CounterResult> decrement(String id)
id
- the document id which is used to uniquely identify it.CounterResult
once completed.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).public CompletableFuture<CounterResult> decrement(String id, DecrementOptions options)
id
- the document id which is used to uniquely identify it.options
- custom options to customize the decrement behavior.CounterResult
once completed.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).Copyright © 2020 Couchbase, Inc.. All rights reserved.