Package com.couchbase.client.java
Class ReactiveBinaryCollection
java.lang.Object
com.couchbase.client.java.ReactiveBinaryCollection
Allows to perform certain operations on non-JSON documents.
-
Method Summary
Modifier and TypeMethodDescriptionAppends binary content to the document.append
(String id, byte[] content, AppendOptions options) Appends binary content to the document with custom options.Decrements the counter document by one.decrement
(String id, DecrementOptions options) Decrements the counter document by one or the number defined in the options.Increments the counter document by one.increment
(String id, IncrementOptions options) Increments the counter document by one or the number defined in the options.Prepends binary content to the document.prepend
(String id, byte[] content, PrependOptions options) Prepends binary content to the document with custom options.
-
Method Details
-
append
Appends binary content to the document.- Parameters:
id
- the document id which is used to uniquely identify it.content
- the binary content to append to the document.- Returns:
- a
MutationResult
once 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).
-
append
Appends binary content to the document with custom options.- 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
MutationResult
once 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).
-
prepend
Prepends binary content to the document.- Parameters:
id
- the document id which is used to uniquely identify it.content
- the binary content to append to the document.- Returns:
- a
MutationResult
once 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).
-
prepend
Prepends binary content to the document with custom options.- 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
MutationResult
once 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).
-
increment
Increments the counter document by one.- Parameters:
id
- the document id which is used to uniquely identify it.- Returns:
- a
CounterResult
once 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).
-
increment
Increments the counter document by one or the number defined in the options.- Parameters:
id
- the document id which is used to uniquely identify it.options
- custom options to customize the increment behavior.- Returns:
- a
CounterResult
once 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).
-
decrement
Decrements the counter document by one.- Parameters:
id
- the document id which is used to uniquely identify it.- Returns:
- a
CounterResult
once 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).
-
decrement
Decrements the counter document by one or the number defined in the options.- Parameters:
id
- the document id which is used to uniquely identify it.options
- custom options to customize the decrement behavior.- Returns:
- a
CounterResult
once 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).
-