Package com.couchbase.client.java
Class CouchbaseBucket
- java.lang.Object
-
- com.couchbase.client.java.CouchbaseBucket
-
-
Constructor Summary
Constructors Constructor Description CouchbaseBucket(AsyncBucket asyncBucket, CouchbaseEnvironment env, ClusterFacade core, String name, String username, String password)Create aCouchbaseBucketthat relies on the providedAsyncBucket.CouchbaseBucket(CouchbaseEnvironment env, ClusterFacade core, String name, String username, String password, List<Transcoder<? extends Document,?>> customTranscoders)Create aCouchbaseBucketthat doesn't reuse an existingAsyncBucketbut rather creates one internally.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <D extends Document<?>>
Dappend(D document)Append aDocuments content to an existing one with the default key/value timeout.<D extends Document<?>>
Dappend(D document, long timeout, TimeUnit timeUnit)Append aDocuments content to an existing one with a custom timeout.<D extends Document<?>>
Dappend(D document, PersistTo persistTo)Append aDocuments content to an existing one with the default key/value timeout.<D extends Document<?>>
Dappend(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)Append aDocuments content to an existing one with a custom timeout.<D extends Document<?>>
Dappend(D document, PersistTo persistTo, ReplicateTo replicateTo)Append aDocuments content to an existing one with the default key/value timeout.<D extends Document<?>>
Dappend(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Append aDocuments content to an existing one with a custom timeout.<D extends Document<?>>
Dappend(D document, ReplicateTo replicateTo)Append aDocuments content to an existing one with the default key/value timeout.<D extends Document<?>>
Dappend(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Append aDocuments content to an existing one with a custom timeout.AsyncBucketasync()Provides access to the underlying asynchronous bucket interface.BucketManagerbucketManager()Provides access to theBucketManagerfor administrative access.Booleanclose()Closes this bucket with the default disconnect timeout.Booleanclose(long timeout, TimeUnit timeUnit)Closes this bucket with a custom timeout.ClusterFacadecore()Returns the underlying "core-io" library through itsClusterFacade.JsonLongDocumentcounter(String id, long delta)Increment or decrement a counter with the given value or throw an exception if it does not exist yet with the default kvTimeout.JsonLongDocumentcounter(String id, long delta, long initial)Increment or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout.JsonLongDocumentcounter(String id, long delta, long initial, int expiry)Increment or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout.JsonLongDocumentcounter(String id, long delta, long initial, int expiry, long timeout, TimeUnit timeUnit)Increment or decrement a counter with the given value and a initial value if it does not exist with a custom timeout.JsonLongDocumentcounter(String id, long delta, long initial, int expiry, PersistTo persistTo)Increment or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout.JsonLongDocumentcounter(String id, long delta, long initial, int expiry, PersistTo persistTo, long timeout, TimeUnit timeUnit)Increment or decrement a counter with the given value and a initial value if it does not exist with a custom timeout.JsonLongDocumentcounter(String id, long delta, long initial, int expiry, PersistTo persistTo, ReplicateTo replicateTo)Increment or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout.JsonLongDocumentcounter(String id, long delta, long initial, int expiry, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Increment or decrement a counter with the given value and a initial value if it does not exist with a custom timeout.JsonLongDocumentcounter(String id, long delta, long initial, int expiry, ReplicateTo replicateTo)Increment or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout.JsonLongDocumentcounter(String id, long delta, long initial, int expiry, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Increment or decrement a counter with the given value and a initial value if it does not exist with a custom timeout.JsonLongDocumentcounter(String id, long delta, long initial, long timeout, TimeUnit timeUnit)Increment or decrement a counter with the given value and a initial value if it does not exist with a custom timeout.JsonLongDocumentcounter(String id, long delta, long initial, PersistTo persistTo)Increment or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout.JsonLongDocumentcounter(String id, long delta, long initial, PersistTo persistTo, long timeout, TimeUnit timeUnit)Increment or decrement a counter with the given value and a initial value if it does not exist with a custom timeout.JsonLongDocumentcounter(String id, long delta, long initial, PersistTo persistTo, ReplicateTo replicateTo)Increment or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout.JsonLongDocumentcounter(String id, long delta, long initial, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Increment or decrement a counter with the given value and a initial value if it does not exist with a custom timeout.JsonLongDocumentcounter(String id, long delta, long initial, ReplicateTo replicateTo)Increment or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout.JsonLongDocumentcounter(String id, long delta, long initial, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Increment or decrement a counter with the given value and a initial value if it does not exist with a custom timeout.JsonLongDocumentcounter(String id, long delta, long timeout, TimeUnit timeUnit)Increment or decrement a counter with the given value or throw an exception if it does not exist yet with a custom timeout.JsonLongDocumentcounter(String id, long delta, PersistTo persistTo)Increment or decrement a counter with the given value or throw an exception if it does not exist yet with the default kvTimeout.JsonLongDocumentcounter(String id, long delta, PersistTo persistTo, long timeout, TimeUnit timeUnit)Increment or decrement a counter with the given value or throw an exception if it does not exist yet with a custom timeout.JsonLongDocumentcounter(String id, long delta, PersistTo persistTo, ReplicateTo replicateTo)Increment or decrement a counter with the given value or throw an exception if it does not exist yet with the default kvTimeout.JsonLongDocumentcounter(String id, long delta, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Increment or decrement a counter with the given value or throw an exception if it does not exist yet with a custom timeout.JsonLongDocumentcounter(String id, long delta, ReplicateTo replicateTo)Increment or decrement a counter with the given value or throw an exception if it does not exist yet with the default kvTimeout.JsonLongDocumentcounter(String id, long delta, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Increment or decrement a counter with the given value or throw an exception if it does not exist yet with a custom timeout.CouchbaseEnvironmentenvironment()TheCouchbaseEnvironmentused.<D extends Document<?>>
booleanexists(D document)Check whether a document with the given ID does exist in the bucket.<D extends Document<?>>
booleanexists(D document, long timeout, TimeUnit timeUnit)Check whether a document with the given ID does exist in the bucket.booleanexists(String id)Check whether a document with the given ID does exist in the bucket.booleanexists(String id, long timeout, TimeUnit timeUnit)Check whether a document with the given ID does exist in the bucket.byte[]exportAnalyticsDeferredResultHandle(AnalyticsDeferredResultHandle handle)Exports the deferred result handle to a serialized form which can be used across SDKs<D extends Document<?>>
Dget(D document)Retrieves any type ofDocumentwith the default key/value timeout.<D extends Document<?>>
Dget(D document, long timeout, TimeUnit timeUnit)Retrieves any type ofDocumentwith a custom timeout.JsonDocumentget(String id)Retrieves aJsonDocumentby its unique ID with the default key/value timeout.JsonDocumentget(String id, long timeout, TimeUnit timeUnit)Retrieves aJsonDocumentby its unique ID with a custom timeout.<D extends Document<?>>
Dget(String id, Class<D> target)Retrieves any type ofDocumentby its ID with the default key/value timeout.<D extends Document<?>>
Dget(String id, Class<D> target, long timeout, TimeUnit timeUnit)Retrieves any type ofDocumentby its ID with a custom timeout.<D extends Document<?>>
DgetAndLock(D document, int lockTime)Retrieve and lock aDocumentby its unique ID with the default key/value timeout.<D extends Document<?>>
DgetAndLock(D document, int lockTime, long timeout, TimeUnit timeUnit)Retrieve and lock aDocumentby its unique ID with a custom timeout.JsonDocumentgetAndLock(String id, int lockTime)Retrieve and lock aJsonDocumentby its unique ID with the default key/value timeout.JsonDocumentgetAndLock(String id, int lockTime, long timeout, TimeUnit timeUnit)Retrieve and lock aJsonDocumentby its unique ID with a custom timeout.<D extends Document<?>>
DgetAndLock(String id, int lockTime, Class<D> target)Retrieve and lock aDocumentby its unique ID with the default key/value timeout.<D extends Document<?>>
DgetAndLock(String id, int lockTime, Class<D> target, long timeout, TimeUnit timeUnit)Retrieve and lock aDocumentby its unique ID with the a custom timeout.<D extends Document<?>>
DgetAndTouch(D document)Retrieve and touch aDocumentby its unique ID with the default key/value timeout.<D extends Document<?>>
DgetAndTouch(D document, long timeout, TimeUnit timeUnit)Retrieve and touch aDocumentby its unique ID with a custom timeout.JsonDocumentgetAndTouch(String id, int expiry)Retrieve and touch aJsonDocumentby its unique ID with the default key/value timeout.JsonDocumentgetAndTouch(String id, int expiry, long timeout, TimeUnit timeUnit)Retrieve and touch aJsonDocumentby its unique ID with the a custom timeout.<D extends Document<?>>
DgetAndTouch(String id, int expiry, Class<D> target)Retrieve and touch aDocumentby its unique ID with the default key/value timeout.<D extends Document<?>>
DgetAndTouch(String id, int expiry, Class<D> target, long timeout, TimeUnit timeUnit)Retrieve and touch aDocumentby its unique ID with a custom timeout.<D extends Document<?>>
Iterator<D>getFromReplica(D document)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with the default timeout.<D extends Document<?>>
Iterator<D>getFromReplica(D document, long timeout, TimeUnit timeUnit)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with a custom timeout.<D extends Document<?>>
List<D>getFromReplica(D document, ReplicaMode type)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with the default timeout.<D extends Document<?>>
List<D>getFromReplica(D document, ReplicaMode type, long timeout, TimeUnit timeUnit)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with a custom timeout.Iterator<JsonDocument>getFromReplica(String id)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with the default timeout.Iterator<JsonDocument>getFromReplica(String id, long timeout, TimeUnit timeUnit)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with a custom timeout.List<JsonDocument>getFromReplica(String id, ReplicaMode type)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with the default timeout.List<JsonDocument>getFromReplica(String id, ReplicaMode type, long timeout, TimeUnit timeUnit)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with a custom timeout.<D extends Document<?>>
List<D>getFromReplica(String id, ReplicaMode type, Class<D> target)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with the default timeout.<D extends Document<?>>
List<D>getFromReplica(String id, ReplicaMode type, Class<D> target, long timeout, TimeUnit timeUnit)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with a custom timeout.<D extends Document<?>>
Iterator<D>getFromReplica(String id, Class<D> target)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with the default timeout.<D extends Document<?>>
Iterator<D>getFromReplica(String id, Class<D> target, long timeout, TimeUnit timeUnit)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with a custom timeout.AnalyticsDeferredResultHandleimportAnalyticsDeferredResultHandle(byte[] b)Imports from json to create aAnalyticsDeferredResultHandle.<D extends Document<?>>
Dinsert(D document)Insert aDocumentif it does not exist already with the default key/value timeout.<D extends Document<?>>
Dinsert(D document, long timeout, TimeUnit timeUnit)Insert aDocumentif it does not exist already with a custom timeout.<D extends Document<?>>
Dinsert(D document, PersistTo persistTo)Insert aDocumentif it does not exist already and watch for durability constraints with the default key/value timeout.<D extends Document<?>>
Dinsert(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)Insert aDocumentif it does not exist already and watch for durability constraints with a custom timeout.<D extends Document<?>>
Dinsert(D document, PersistTo persistTo, ReplicateTo replicateTo)Insert aDocumentif it does not exist already and watch for durability constraints with the default key/value timeout.<D extends Document<?>>
Dinsert(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Insert aDocumentif it does not exist already and watch for durability constraints with a custom timeout.<D extends Document<?>>
Dinsert(D document, ReplicateTo replicateTo)Insert aDocumentif it does not exist already and watch for durability constraints with the default key/value timeout.<D extends Document<?>>
Dinsert(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Insert aDocumentif it does not exist already and watch for durability constraints with a custom timeout.intinvalidateQueryCache()Invalidates and clears the internal query cache.booleanisClosed()Returns true if this bucket is already closed, false if it is still open.<E> booleanlistAppend(String docId, E element)Push an element to tail of CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> booleanlistAppend(String docId, E element, long timeout, TimeUnit timeUnit)Push an element to tail of CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> booleanlistAppend(String docId, E element, MutationOptionBuilder mutationOptionBuilder)Push an element to tail of CouchbaseList with additional mutation options provided byMutationOptionBuilder.<E> booleanlistAppend(String docId, E element, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)Push an element to tail of CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.<E> ElistGet(String docId, int index, Class<E> elementType)Get element at an index in the CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the index is not found in the listPathNotFoundException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> ElistGet(String docId, int index, Class<E> elementType, long timeout, TimeUnit timeUnit)Get element at an index in the CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> booleanlistPrepend(String docId, E element)Shift list head to element in CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.<E> booleanlistPrepend(String docId, E element, long timeout, TimeUnit timeUnit)Shift list head to element in CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.<E> booleanlistPrepend(String docId, E element, MutationOptionBuilder mutationOptionBuilder)Shift list head to element in CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.<E> booleanlistPrepend(String docId, E element, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)Shift list head to element in CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.booleanlistRemove(String docId, int index)Remove an element from an index in CouchbaseList This method throws under the following conditions: -IndexOutOfBoundsExceptionif index is not found - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.booleanlistRemove(String docId, int index, long timeout, TimeUnit timeUnit)Remove an element from an index in CouchbaseList This method throws under the following conditions: -IndexOutOfBoundsExceptionif index is not found - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.booleanlistRemove(String docId, int index, MutationOptionBuilder mutationOptionBuilder)Remove an element from an index in CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: -IndexOutOfBoundsExceptionif index is not found - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.booleanlistRemove(String docId, int index, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)Remove an element from an index in CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: -IndexOutOfBoundsExceptionif index is not found - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.<E> booleanlistSet(String docId, int index, E element)Add an element at an index in CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> booleanlistSet(String docId, int index, E element, long timeout, TimeUnit timeUnit)Add an element at an index in CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> booleanlistSet(String docId, int index, E element, MutationOptionBuilder mutationOptionBuilder)Add an element at an index in CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.<E> booleanlistSet(String docId, int index, E element, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)Add an element at an index in CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.intlistSize(String docId)Returns the number of elements in CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.intlistSize(String docId, long timeout, TimeUnit timeUnit)Returns the number of elements in CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.LookupInBuilderlookupIn(String docId)Prepare a sub-document lookup through abuilder API.<V> booleanmapAdd(String docId, String key, V value)Add a key value pair into CouchbaseMap If the underlying document for the map does not exist, this operation will create a new document to back the data structure.<V> booleanmapAdd(String docId, String key, V value, long timeout, TimeUnit timeUnit)Add a key value pair into CouchbaseMap If the underlying document for the map does not exist, this operation will create a new document to back the data structure.<V> booleanmapAdd(String docId, String key, V value, MutationOptionBuilder mutationOptionBuilder)Add a key value pair into CouchbaseMap with additional mutation options provided byMutationOptionBuilderIf the underlying document for the map does not exist, this operation will create a new document to back the data structure.<V> booleanmapAdd(String docId, String key, V value, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)Add a key value pair into CouchbaseMap with additional mutation options provided byMutationOptionBuilderIf the underlying document for the map does not exist, this operation will create a new document to back the data structure.<V> VmapGet(String docId, String key, Class<V> valueType)Get value of a key in the CouchbaseMap This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the key is not found in the mapPathNotFoundException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<V> VmapGet(String docId, String key, Class<V> valueType, long timeout, TimeUnit timeUnit)Get value of a key in the CouchbaseMap This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.booleanmapRemove(String docId, String key)Remove a key value pair from CouchbaseMap This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.booleanmapRemove(String docId, String key, long timeout, TimeUnit timeUnit)Remove a key value pair from CouchbaseMap This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.booleanmapRemove(String docId, String key, MutationOptionBuilder mutationOptionBuilder)Remove a key value pair from CouchbaseMap with additional mutation options provided byMutationOptionBuilder.booleanmapRemove(String docId, String key, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)Remove a key value pair from CouchbaseMap with additional mutation options provided byMutationOptionBuilder.intmapSize(String docId)Returns the number key value pairs in CouchbaseMap This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.intmapSize(String docId, long timeout, TimeUnit timeUnit)Returns the number key value pairs in CouchbaseMap This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.MutateInBuildermutateIn(String docId)Prepare a sub-document mutation through abuilder API.Stringname()The name of theBucket.PingReportping()Performs a diagnostic active "ping" call with a random report id on all services.PingReportping(long timeout, TimeUnit timeUnit)Performs a diagnostic active "ping" call on all services with a random report id.PingReportping(String reportId)Performs a diagnostic active "ping" call with a custom report ID on all services.PingReportping(String reportId, long timeout, TimeUnit timeUnit)Performs a diagnostic active "ping" call with a custom report ID on all services.PingReportping(String reportId, Collection<ServiceType> services)Performs a diagnostic active "ping" call with a custom report id on all services.PingReportping(String reportId, Collection<ServiceType> services, long timeout, TimeUnit timeUnit)Performs a diagnostic active "ping" call against all the services provided with a custom report id.PingReportping(Collection<ServiceType> services)Performs a diagnostic active "ping" call with a random report id on all services.PingReportping(Collection<ServiceType> services, long timeout, TimeUnit timeUnit)Performs a diagnostic active "ping" call on a list of services with a random report id.<D extends Document<?>>
Dprepend(D document)Prepend aDocuments content to an existing one with the default key/value timeout.<D extends Document<?>>
Dprepend(D document, long timeout, TimeUnit timeUnit)Prepend aDocuments content to an existing one with a custom timeout.<D extends Document<?>>
Dprepend(D document, PersistTo persistTo)Prepend aDocuments content to an existing one with the default key/value timeout.<D extends Document<?>>
Dprepend(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)Prepend aDocuments content to an existing one with a custom timeout.<D extends Document<?>>
Dprepend(D document, PersistTo persistTo, ReplicateTo replicateTo)Prepend aDocuments content to an existing one with the default key/value timeout.<D extends Document<?>>
Dprepend(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Prepend aDocuments content to an existing one with a custom timeout.<D extends Document<?>>
Dprepend(D document, ReplicateTo replicateTo)Prepend aDocuments content to an existing one with the default key/value timeout.<D extends Document<?>>
Dprepend(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Prepend aDocuments content to an existing one with a custom timeout.AnalyticsQueryResultquery(AnalyticsQuery query)Queries Couchbase AnalyticsAnalyticsQueryResultquery(AnalyticsQuery query, long timeout, TimeUnit timeUnit)Queries Couchbase AnalyticsN1qlQueryResultquery(N1qlQuery query)Queries a N1QL secondary index with thedefault query timeout.N1qlQueryResultquery(N1qlQuery query, long timeout, TimeUnit timeUnit)Queries a N1QL secondary index with a custom timeout.N1qlQueryResultquery(Statement statement)Queries a N1QL secondary index with thedefault query timeout.N1qlQueryResultquery(Statement statement, long timeout, TimeUnit timeUnit)Queries a N1QL secondary index with a custom timeout.SearchQueryResultquery(SearchQuery query)Queries a Full-Text Index This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledExceptionSearchQueryResultquery(SearchQuery query, long timeout, TimeUnit timeUnit)Queries a Full-Text Index This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledExceptionSpatialViewResultquery(SpatialViewQuery query)Queries a Couchbase Server SpatialViewwith thedefault view timeout.SpatialViewResultquery(SpatialViewQuery query, long timeout, TimeUnit timeUnit)Queries a Couchbase Server SpatialViewwith a custom timeout.ViewResultquery(ViewQuery query)Queries a Couchbase ServerViewwith thedefault view timeout.ViewResultquery(ViewQuery query, long timeout, TimeUnit timeUnit)Queries a Couchbase ServerViewwith a custom timeout.<E> EqueuePop(String docId, Class<E> elementType)Removes the first element from CouchbaseQueue This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> EqueuePop(String docId, Class<E> elementType, long timeout, TimeUnit timeUnit)Removes the first element from CouchbaseQueue This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> EqueuePop(String docId, Class<E> elementType, MutationOptionBuilder mutationOptionBuilder)Removes the first element from CouchbaseQueue with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.<E> EqueuePop(String docId, Class<E> elementType, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)Removes the first element from CouchbaseQueue with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.<E> booleanqueuePush(String docId, E element)Add an element into CouchbaseQueue This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> booleanqueuePush(String docId, E element, long timeout, TimeUnit timeUnit)Add an element into CouchbaseQueue This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> booleanqueuePush(String docId, E element, MutationOptionBuilder mutationOptionBuilder)Add an element into CouchbaseQueue with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.<E> booleanqueuePush(String docId, E element, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)Add an element into CouchbaseQueue with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.intqueueSize(String docId)Returns the number of elements in CouchbaseQueue This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.intqueueSize(String docId, long timeout, TimeUnit timeUnit)Returns the number of elements in CouchbaseQueue This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<D extends Document<?>>
Dremove(D document)Removes aDocumentfrom the Server with the default key/value timeout.<D extends Document<?>>
Dremove(D document, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server with a custom timeout.<D extends Document<?>>
Dremove(D document, PersistTo persistTo)Removes aDocumentfrom the Server and apply a durability requirement with the default key/value timeout.<D extends Document<?>>
Dremove(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server and apply a durability requirement with a custom timeout.<D extends Document<?>>
Dremove(D document, PersistTo persistTo, ReplicateTo replicateTo)Removes aDocumentfrom the Server and apply a durability requirement with the default key/value timeout.<D extends Document<?>>
Dremove(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server and apply a durability requirement with a custom timeout.<D extends Document<?>>
Dremove(D document, ReplicateTo replicateTo)Removes aDocumentfrom the Server and apply a durability requirement with the default key/value timeout.<D extends Document<?>>
Dremove(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server and apply a durability requirement with a custom timeout.JsonDocumentremove(String id)Removes aDocumentfrom the Server identified by its ID with the default key/value timeout.JsonDocumentremove(String id, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server identified by its ID with a custom timeout.JsonDocumentremove(String id, PersistTo persistTo)Removes aDocumentfrom the Server by its ID and apply a durability requirement with the default key/value timeout.JsonDocumentremove(String id, PersistTo persistTo, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server by its ID and apply a durability requirement with a custom timeout.JsonDocumentremove(String id, PersistTo persistTo, ReplicateTo replicateTo)Removes aDocumentfrom the Server by its ID and apply a durability requirement with the default key/value timeout.JsonDocumentremove(String id, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server by its ID and apply a durability requirement with a custom timeout.<D extends Document<?>>
Dremove(String id, PersistTo persistTo, ReplicateTo replicateTo, Class<D> target)Removes aDocumentfrom the Server by its ID and apply a durability requirement with the default key/value timeout.<D extends Document<?>>
Dremove(String id, PersistTo persistTo, ReplicateTo replicateTo, Class<D> target, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server by its ID and apply a durability requirement with a custom timeout.<D extends Document<?>>
Dremove(String id, PersistTo persistTo, Class<D> target)Removes aDocumentfrom the Server by its ID and apply a durability requirement with the default key/value timeout.<D extends Document<?>>
Dremove(String id, PersistTo persistTo, Class<D> target, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server by its ID and apply a durability requirement with a custom timeout.JsonDocumentremove(String id, ReplicateTo replicateTo)Removes aDocumentfrom the Server by its ID and apply a durability requirement with the default key/value timeout.JsonDocumentremove(String id, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server by its ID and apply a durability requirement with a custom timeout.<D extends Document<?>>
Dremove(String id, ReplicateTo replicateTo, Class<D> target)Removes aDocumentfrom the Server by its ID and apply a durability requirement with the default key/value timeout.<D extends Document<?>>
Dremove(String id, ReplicateTo replicateTo, Class<D> target, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server by its ID and apply a durability requirement with a custom timeout.<D extends Document<?>>
Dremove(String id, Class<D> target)Removes aDocumentfrom the Server identified by its ID with the default key/value timeout.<D extends Document<?>>
Dremove(String id, Class<D> target, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server identified by its ID with a custom timeout.<D extends Document<?>>
Dreplace(D document)Replace aDocumentif it does already exist with the default key/value timeout.<D extends Document<?>>
Dreplace(D document, long timeout, TimeUnit timeUnit)Replace aDocumentif it does already exist with a custom timeout.<D extends Document<?>>
Dreplace(D document, PersistTo persistTo)Replace aDocumentif it does exist and watch for durability constraints with the default key/value timeout.<D extends Document<?>>
Dreplace(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)Replace aDocumentif it does exist and watch for durability constraints with a custom timeout.<D extends Document<?>>
Dreplace(D document, PersistTo persistTo, ReplicateTo replicateTo)Replace aDocumentif it does exist and watch for durability constraints with the default key/value timeout.<D extends Document<?>>
Dreplace(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Replace aDocumentif it does exist and watch for durability constraints with a custom timeout.<D extends Document<?>>
Dreplace(D document, ReplicateTo replicateTo)Replace aDocumentif it does exist and watch for durability constraints with the default key/value timeout.<D extends Document<?>>
Dreplace(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Replace aDocumentif it does exist and watch for durability constraints with a custom timeout.Repositoryrepository()TheRepositoryprovides access to full object document mapping (ODM) capabilities.<E> booleansetAdd(String docId, E element)Add an element into CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> booleansetAdd(String docId, E element, long timeout, TimeUnit timeUnit)Add an element into CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> booleansetAdd(String docId, E element, MutationOptionBuilder mutationOptionBuilder)Add an element into CouchbaseSet with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> booleansetAdd(String docId, E element, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)Add an element into CouchbaseSet with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> booleansetContains(String docId, E element)Check if an element exists in CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> booleansetContains(String docId, E element, long timeout, TimeUnit timeUnit)Check if an element exists in CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> EsetRemove(String docId, E element)Removes an element from CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> EsetRemove(String docId, E element, long timeout, TimeUnit timeUnit)Removes an element from CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.<E> EsetRemove(String docId, E element, MutationOptionBuilder mutationOptionBuilder)Removes an element from CouchbaseSet with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.<E> EsetRemove(String docId, E element, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)Removes an element from CouchbaseSet with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException.intsetSize(String docId)Returns the number of elements in CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.intsetSize(String docId, long timeout, TimeUnit timeUnit)Returns the number of elements in CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.StringtoString()<D extends Document<?>>
Booleantouch(D document)Renews the expiration time of aDocumentwith the default key/value timeout.<D extends Document<?>>
Booleantouch(D document, long timeout, TimeUnit timeUnit)Renews the expiration time of aDocumentwith a custom timeout.Booleantouch(String id, int expiry)Renews the expiration time of aDocumentwith the default key/value timeout.Booleantouch(String id, int expiry, long timeout, TimeUnit timeUnit)Renews the expiration time of aDocumentwith a custom timeout.<D extends Document<?>>
Booleanunlock(D document)Unlocks a write-lockedDocumentwith the default key/value timeout.<D extends Document<?>>
Booleanunlock(D document, long timeout, TimeUnit timeUnit)Unlocks a write-lockedDocumentwith a custom timeout.Booleanunlock(String id, long cas)Unlocks a write-lockedDocumentwith the default key/value timeout.Booleanunlock(String id, long cas, long timeout, TimeUnit timeUnit)Unlocks a write-lockedDocumentwith a custom timeout.<D extends Document<?>>
Dupsert(D document)Insert or overwrite aDocumentwith the default key/value timeout.<D extends Document<?>>
Dupsert(D document, long timeout, TimeUnit timeUnit)Insert or overwrite aDocumentwith a custom timeout.<D extends Document<?>>
Dupsert(D document, PersistTo persistTo)Insert or overwrite aDocumentand watch for durability constraints with the default key/value timeout.<D extends Document<?>>
Dupsert(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)Insert or overwrite aDocumentand watch for durability constraints with a custom timeout.<D extends Document<?>>
Dupsert(D document, PersistTo persistTo, ReplicateTo replicateTo)Insert or overwrite aDocumentand watch for durability constraints with the default key/value timeout.<D extends Document<?>>
Dupsert(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Insert or overwrite aDocumentand watch for durability constraints with a custom timeout.<D extends Document<?>>
Dupsert(D document, ReplicateTo replicateTo)Insert or overwrite aDocumentand watch for durability constraints with the default key/value timeout.<D extends Document<?>>
Dupsert(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Insert or overwrite aDocumentand watch for durability constraints with a custom timeout.
-
-
-
Constructor Detail
-
CouchbaseBucket
public CouchbaseBucket(CouchbaseEnvironment env, ClusterFacade core, String name, String username, String password, List<Transcoder<? extends Document,?>> customTranscoders)
Create aCouchbaseBucketthat doesn't reuse an existingAsyncBucketbut rather creates one internally. Prefer using the alternative constructorCouchbaseBucket(AsyncBucket, CouchbaseEnvironment, ClusterFacade, String, String, String)if you can obtain an AsyncBucket externally.
-
CouchbaseBucket
public CouchbaseBucket(AsyncBucket asyncBucket, CouchbaseEnvironment env, ClusterFacade core, String name, String username, String password)
Create aCouchbaseBucketthat relies on the providedAsyncBucket.
-
-
Method Detail
-
async
public AsyncBucket async()
Description copied from interface:BucketProvides access to the underlying asynchronous bucket interface.
-
core
public ClusterFacade core()
Description copied from interface:BucketReturns the underlying "core-io" library through itsClusterFacade. Handle with care, with great power comes great responsibility. All additional checks which are normally performed by this library are skipped.- Specified by:
corein interfaceBucket- Returns:
- the underlying
ClusterFacadefrom the "core-io" package.
-
environment
public CouchbaseEnvironment environment()
Description copied from interface:BucketTheCouchbaseEnvironmentused.- Specified by:
environmentin interfaceBucket- Returns:
- the CouchbaseEnvironment.
-
repository
public Repository repository()
Description copied from interface:BucketTheRepositoryprovides access to full object document mapping (ODM) capabilities. It allows you to work with POJO entities only and use annotations to customize the behaviour and mapping characteristics.- Specified by:
repositoryin interfaceBucket- Returns:
- the repository for ODM capabilities.
-
get
public JsonDocument get(String id)
Description copied from interface:BucketRetrieves aJsonDocumentby its unique ID with the default key/value timeout. If the document is found, aJsonDocumentis returned. If the document is not found, null is returned. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getin interfaceBucket- Parameters:
id- the unique ID of the document.- Returns:
- the found
JsonDocumentor null if not found.
-
get
public JsonDocument get(String id, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieves aJsonDocumentby its unique ID with a custom timeout. If the document is found, aJsonDocumentis returned. If the document is not found, null is returned. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getin interfaceBucket- Parameters:
id- the unique ID of the document.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the found
JsonDocumentor null if not found.
-
get
public <D extends Document<?>> D get(D document)
Description copied from interface:BucketRetrieves any type ofDocumentwith the default key/value timeout. The document ID is taken out of theDocumentprovided, as well as the target type to return. Note that not the same document is returned, but rather a new one of the same type with the freshly loaded properties. If the document is found, aDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
get
public <D extends Document<?>> D get(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieves any type ofDocumentwith a custom timeout. The document ID is taken out of theDocumentprovided, as well as the target type to return. Note that not the same document is returned, but rather a new one of the same type with the freshly loaded properties. If the document is found, aDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
get
public <D extends Document<?>> D get(String id, Class<D> target)
Description copied from interface:BucketRetrieves any type ofDocumentby its ID with the default key/value timeout. The document ID is taken out of theDocumentprovided, as well as the target type to return. Note that not the same document is returned, but rather a new one of the same type with the freshly loaded properties. If the document is found, aDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
get
public <D extends Document<?>> D get(String id, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieves any type ofDocumentby its ID with a custom timeout. The document ID is taken out of theDocumentprovided, as well as the target type to return. Note that not the same document is returned, but rather a new one of the same type with the freshly loaded properties. If the document is found, aDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
exists
public boolean exists(String id)
Description copied from interface:BucketCheck whether a document with the given ID does exist in the bucket. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
exists
public boolean exists(String id, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketCheck whether a document with the given ID does exist in the bucket. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
exists
public <D extends Document<?>> boolean exists(D document)
Description copied from interface:BucketCheck whether a document with the given ID does exist in the bucket. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
exists
public <D extends Document<?>> boolean exists(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketCheck whether a document with the given ID does exist in the bucket. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
getFromReplica
public List<JsonDocument> getFromReplica(String id, ReplicaMode type)
Description copied from interface:BucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with the default timeout. Depending on theReplicaModeselected, there can be none to fourJsonDocumentbe returned from theObservable. IfReplicaMode.FIRST,ReplicaMode.SECONDorReplicaMode.THIRDare selected zero or one documents are returned, ifReplicaMode.ALLis used, all configured replicas plus the master node may return a document. If the document has not been replicated yet or if the replica or master are not available (because a node has been failed over), no response is expected from these nodes. **Since data is replicated asynchronously, all data returned from this method must be considered stale. If the appropriateReplicateToconstraints are set on write and the operation returns successfully, then the data can be considered as non-stale.** Note that the returningJsonDocumentresponses can come in any order. Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, most errors are swallowed (but logged) and the Observable will return all successful responses. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- Specified by:
getFromReplicain interfaceBucket- Parameters:
id- id the unique ID of the document.type- theReplicaModeto select.- Returns:
- a List containing zero to N
JsonDocuments.
-
getFromReplica
public List<JsonDocument> getFromReplica(String id, ReplicaMode type, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with a custom timeout. Depending on theReplicaModeselected, there can be none to fourJsonDocumentbe returned from theObservable. IfReplicaMode.FIRST,ReplicaMode.SECONDorReplicaMode.THIRDare selected zero or one documents are returned, ifReplicaMode.ALLis used, all configured replicas plus the master node may return a document. If the document has not been replicated yet or if the replica or master are not available (because a node has been failed over), no response is expected from these nodes. **Since data is replicated asynchronously, all data returned from this method must be considered stale. If the appropriateReplicateToconstraints are set on write and the operation returns successfully, then the data can be considered as non-stale.** Note that the returningJsonDocumentresponses can come in any order. Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, most errors are swallowed (but logged) and the Observable will return all successful responses. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- Specified by:
getFromReplicain interfaceBucket- Parameters:
id- id the unique ID of the document.type- theReplicaModeto select.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a List containing zero to N
JsonDocuments.
-
getFromReplica
public <D extends Document<?>> List<D> getFromReplica(D document, ReplicaMode type)
Description copied from interface:BucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with the default timeout. Depending on theReplicaModeselected, there can be none to fourJsonDocumentbe returned from theObservable. IfReplicaMode.FIRST,ReplicaMode.SECONDorReplicaMode.THIRDare selected zero or one documents are returned, ifReplicaMode.ALLis used, all configured replicas plus the master node may return a document. If the document has not been replicated yet or if the replica or master are not available (because a node has been failed over), no response is expected from these nodes. **Since data is replicated asynchronously, all data returned from this method must be considered stale. If the appropriateReplicateToconstraints are set on write and the operation returns successfully, then the data can be considered as non-stale.** Note that the returningJsonDocumentresponses can come in any order. Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, most errors are swallowed (but logged) and the Observable will return all successful responses. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- Specified by:
getFromReplicain interfaceBucket- Parameters:
document- the document to extract the ID from.type- theReplicaModeto select.- Returns:
- a List containing zero to N
JsonDocuments.
-
getFromReplica
public <D extends Document<?>> List<D> getFromReplica(D document, ReplicaMode type, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with a custom timeout. Depending on theReplicaModeselected, there can be none to fourJsonDocumentbe returned from theObservable. IfReplicaMode.FIRST,ReplicaMode.SECONDorReplicaMode.THIRDare selected zero or one documents are returned, ifReplicaMode.ALLis used, all configured replicas plus the master node may return a document. If the document has not been replicated yet or if the replica or master are not available (because a node has been failed over), no response is expected from these nodes. **Since data is replicated asynchronously, all data returned from this method must be considered stale. If the appropriateReplicateToconstraints are set on write and the operation returns successfully, then the data can be considered as non-stale.** Note that the returningJsonDocumentresponses can come in any order. Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, most errors are swallowed (but logged) and the Observable will return all successful responses. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- Specified by:
getFromReplicain interfaceBucket- Parameters:
document- the document to extract the ID from.type- theReplicaModeto select.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a List containing zero to N
JsonDocuments.
-
getFromReplica
public <D extends Document<?>> List<D> getFromReplica(String id, ReplicaMode type, Class<D> target)
Description copied from interface:BucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with the default timeout. Depending on theReplicaModeselected, there can be none to fourJsonDocumentbe returned from theObservable. IfReplicaMode.FIRST,ReplicaMode.SECONDorReplicaMode.THIRDare selected zero or one documents are returned, ifReplicaMode.ALLis used, all configured replicas plus the master node may return a document. If the document has not been replicated yet or if the replica or master are not available (because a node has been failed over), no response is expected from these nodes. **Since data is replicated asynchronously, all data returned from this method must be considered stale. If the appropriateReplicateToconstraints are set on write and the operation returns successfully, then the data can be considered as non-stale.** Note that the returningJsonDocumentresponses can come in any order. Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, most errors are swallowed (but logged) and the Observable will return all successful responses. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- Specified by:
getFromReplicain interfaceBucket- Parameters:
id- the id of the document.type- theReplicaModeto select.- Returns:
- a List containing zero to N
JsonDocuments.
-
getFromReplica
public <D extends Document<?>> List<D> getFromReplica(String id, ReplicaMode type, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with a custom timeout. Depending on theReplicaModeselected, there can be none to fourJsonDocumentbe returned from theObservable. IfReplicaMode.FIRST,ReplicaMode.SECONDorReplicaMode.THIRDare selected zero or one documents are returned, ifReplicaMode.ALLis used, all configured replicas plus the master node may return a document. If the document has not been replicated yet or if the replica or master are not available (because a node has been failed over), no response is expected from these nodes. **Since data is replicated asynchronously, all data returned from this method must be considered stale. If the appropriateReplicateToconstraints are set on write and the operation returns successfully, then the data can be considered as non-stale.** Note that the returningJsonDocumentresponses can come in any order. Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, most errors are swallowed (but logged) and the Observable will return all successful responses. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- Specified by:
getFromReplicain interfaceBucket- Parameters:
id- the id of the document.type- theReplicaModeto select.target- the target document type to use.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a List containing zero to N
JsonDocuments.
-
getFromReplica
public Iterator<JsonDocument> getFromReplica(String id)
Description copied from interface:BucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with the default timeout. This method has theReplicaMode.ALLpreselected. If you are only interested in the first (or just some) values, you can iterate and then break out of the iterator loop. Documents are pushed into the iterator as they arrive, which distinguishes this method from theListequivalents which wait until all responses arrive. If the document has not been replicated yet or if the replica or master are not available (because a node has been failed over), no response is expected from these nodes. **Since data is replicated asynchronously, all data returned from this method must be considered stale. If the appropriateReplicateToconstraints are set on write and the operation returns successfully, then the data can be considered as non-stale.** Note that the returningJsonDocumentresponses can come in any order. Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, most errors are swallowed (but logged) and the Observable will return all successful responses. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- Specified by:
getFromReplicain interfaceBucket- Parameters:
id- the unique ID of the document.- Returns:
- the Iterator containing Documents as they arrive.
-
getFromReplica
public <D extends Document<?>> Iterator<D> getFromReplica(D document)
Description copied from interface:BucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with the default timeout. This method has theReplicaMode.ALLpreselected. If you are only interested in the first (or just some) values, you can iterate and then break out of the iterator loop. Documents are pushed into the iterator as they arrive, which distinguishes this method from theListequivalents which wait until all responses arrive. If the document has not been replicated yet or if the replica or master are not available (because a node has been failed over), no response is expected from these nodes. **Since data is replicated asynchronously, all data returned from this method must be considered stale. If the appropriateReplicateToconstraints are set on write and the operation returns successfully, then the data can be considered as non-stale.** Note that the returningJsonDocumentresponses can come in any order. Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, most errors are swallowed (but logged) and the Observable will return all successful responses. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- Specified by:
getFromReplicain interfaceBucket- Parameters:
document- the document to extract the ID from.- Returns:
- the Iterator containing Documents as they arrive.
-
getFromReplica
public <D extends Document<?>> Iterator<D> getFromReplica(String id, Class<D> target)
Description copied from interface:BucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with the default timeout. This method has theReplicaMode.ALLpreselected. If you are only interested in the first (or just some) values, you can iterate and then break out of the iterator loop. Documents are pushed into the iterator as they arrive, which distinguishes this method from theListequivalents which wait until all responses arrive. If the document has not been replicated yet or if the replica or master are not available (because a node has been failed over), no response is expected from these nodes. **Since data is replicated asynchronously, all data returned from this method must be considered stale. If the appropriateReplicateToconstraints are set on write and the operation returns successfully, then the data can be considered as non-stale.** Note that the returningJsonDocumentresponses can come in any order. Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, most errors are swallowed (but logged) and the Observable will return all successful responses. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- Specified by:
getFromReplicain interfaceBucket- Parameters:
id- the unique ID of the document.target- the target document type to use.- Returns:
- the Iterator containing Documents as they arrive.
-
getFromReplica
public <D extends Document<?>> Iterator<D> getFromReplica(String id, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with a custom timeout. This method has theReplicaMode.ALLpreselected. If you are only interested in the first (or just some) values, you can iterate and then break out of the iterator loop. Documents are pushed into the iterator as they arrive, which distinguishes this method from theListequivalents which wait until all responses arrive. If the document has not been replicated yet or if the replica or master are not available (because a node has been failed over), no response is expected from these nodes. **Since data is replicated asynchronously, all data returned from this method must be considered stale. If the appropriateReplicateToconstraints are set on write and the operation returns successfully, then the data can be considered as non-stale.** Note that the returningJsonDocumentresponses can come in any order. Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, most errors are swallowed (but logged) and the Observable will return all successful responses. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- Specified by:
getFromReplicain interfaceBucket- Parameters:
id- the unique ID of the document.target- the target document type to use.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the Iterator containing Documents as they arrive.
-
getFromReplica
public <D extends Document<?>> Iterator<D> getFromReplica(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with a custom timeout. This method has theReplicaMode.ALLpreselected. If you are only interested in the first (or just some) values, you can iterate and then break out of the iterator loop. Documents are pushed into the iterator as they arrive, which distinguishes this method from theListequivalents which wait until all responses arrive. If the document has not been replicated yet or if the replica or master are not available (because a node has been failed over), no response is expected from these nodes. **Since data is replicated asynchronously, all data returned from this method must be considered stale. If the appropriateReplicateToconstraints are set on write and the operation returns successfully, then the data can be considered as non-stale.** Note that the returningJsonDocumentresponses can come in any order. Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, most errors are swallowed (but logged) and the Observable will return all successful responses. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- Specified by:
getFromReplicain interfaceBucket- Parameters:
document- the document to extract the ID from.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the Iterator containing Documents as they arrive.
-
getFromReplica
public Iterator<JsonDocument> getFromReplica(String id, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID with a custom timeout. This method has theReplicaMode.ALLpreselected. If you are only interested in the first (or just some) values, you can iterate and then break out of the iterator loop. Documents are pushed into the iterator as they arrive, which distinguishes this method from theListequivalents which wait until all responses arrive. If the document has not been replicated yet or if the replica or master are not available (because a node has been failed over), no response is expected from these nodes. **Since data is replicated asynchronously, all data returned from this method must be considered stale. If the appropriateReplicateToconstraints are set on write and the operation returns successfully, then the data can be considered as non-stale.** Note that the returningJsonDocumentresponses can come in any order. Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, most errors are swallowed (but logged) and the Observable will return all successful responses. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- Specified by:
getFromReplicain interfaceBucket- Parameters:
id- the unique ID of the document.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the Iterator containing Documents as they arrive.
-
getAndLock
public JsonDocument getAndLock(String id, int lockTime)
Description copied from interface:BucketRetrieve and lock aJsonDocumentby its unique ID with the default key/value timeout. If the document is found, aJsonDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toBucket.get(String), but in addition it (write) locks the document for the given lock time interval. Note that this lock time is hard capped to 30 seconds, even if provided with a higher value and is not configurable. The document will unlock afterwards automatically. Detecting an already locked document is done by checking forTemporaryLockFailureException. Note that this exception can also be raised in other conditions, always when the error is transient and retrying may help. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- A transient error occurred, most probably the key was already locked:TemporaryLockFailureException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getAndLockin interfaceBucket- Parameters:
id- id the unique ID of the document.lockTime- the time to write lock the document (max. 30 seconds).- Returns:
- the found
JsonDocumentor null.
-
getAndLock
public JsonDocument getAndLock(String id, int lockTime, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieve and lock aJsonDocumentby its unique ID with a custom timeout. If the document is found, aJsonDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toBucket.get(String), but in addition it (write) locks the document for the given lock time interval. Note that this lock time is hard capped to 30 seconds, even if provided with a higher value and is not configurable. The document will unlock afterwards automatically. Detecting an already locked document is done by checking forTemporaryLockFailureException. Note that this exception can also be raised in other conditions, always when the error is transient and retrying may help. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- A transient error occurred, most probably the key was already locked:TemporaryLockFailureException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getAndLockin interfaceBucket- Parameters:
id- id the unique ID of the document.lockTime- the time to write lock the document (max. 30 seconds).timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the found
JsonDocumentor null.
-
getAndLock
public <D extends Document<?>> D getAndLock(D document, int lockTime)
Description copied from interface:BucketRetrieve and lock aDocumentby its unique ID with the default key/value timeout. If the document is found, aDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toBucket.get(Document), but in addition it (write) locks the document for the given lock time interval. Note that this lock time is hard capped to 30 seconds, even if provided with a higher value and is not configurable. The document will unlock afterwards automatically. Detecting an already locked document is done by checking forTemporaryLockFailureException. Note that this exception can also be raised in other conditions, always when the error is transient and retrying may help. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- A transient error occurred, most probably the key was already locked:TemporaryLockFailureException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getAndLockin interfaceBucket- Parameters:
document- the source document from which the ID is taken and the type is inferred.lockTime- the time to write lock the document (max. 30 seconds).- Returns:
- the found
Documentor null.
-
getAndLock
public <D extends Document<?>> D getAndLock(D document, int lockTime, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieve and lock aDocumentby its unique ID with a custom timeout. If the document is found, aDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toBucket.get(Document), but in addition it (write) locks the document for the given lock time interval. Note that this lock time is hard capped to 30 seconds, even if provided with a higher value and is not configurable. The document will unlock afterwards automatically. Detecting an already locked document is done by checking forTemporaryLockFailureException. Note that this exception can also be raised in other conditions, always when the error is transient and retrying may help. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- A transient error occurred, most probably the key was already locked:TemporaryLockFailureException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getAndLockin interfaceBucket- Parameters:
document- the source document from which the ID is taken and the type is inferred.lockTime- the time to write lock the document (max. 30 seconds).timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the found
Documentor null.
-
getAndLock
public <D extends Document<?>> D getAndLock(String id, int lockTime, Class<D> target)
Description copied from interface:BucketRetrieve and lock aDocumentby its unique ID with the default key/value timeout. This method differs fromBucket.getAndLock(String, int)in that if a specificDocumenttype is passed in, the appropriateTranscoderwill be selected (and not JSON conversion). If the document is found, aDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toBucket.get(String), but in addition it (write) locks the document for the given lock time interval. Note that this lock time is hard capped to 30 seconds, even if provided with a higher value and is not configurable. The document will unlock afterwards automatically. Detecting an already locked document is done by checking forTemporaryLockFailureException. Note that this exception can also be raised in other conditions, always when the error is transient and retrying may help. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- A transient error occurred, most probably the key was already locked:TemporaryLockFailureException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getAndLockin interfaceBucket- Parameters:
id- id the unique ID of the document.lockTime- the time to write lock the document (max. 30 seconds).target- the target document type to use.- Returns:
- the found
Documentor null.
-
getAndLock
public <D extends Document<?>> D getAndLock(String id, int lockTime, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieve and lock aDocumentby its unique ID with the a custom timeout. This method differs fromBucket.getAndLock(String, int)in that if a specificDocumenttype is passed in, the appropriateTranscoderwill be selected (and not JSON conversion). If the document is found, aDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toBucket.get(String), but in addition it (write) locks the document for the given lock time interval. Note that this lock time is hard capped to 30 seconds, even if provided with a higher value and is not configurable. The document will unlock afterwards automatically. Detecting an already locked document is done by checking forTemporaryLockFailureException. Note that this exception can also be raised in other conditions, always when the error is transient and retrying may help. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- A transient error occurred, most probably the key was already locked:TemporaryLockFailureException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getAndLockin interfaceBucket- Parameters:
id- id the unique ID of the document.lockTime- the time to write lock the document (max. 30 seconds).target- the target document type to use.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the found
Documentor null.
-
getAndTouch
public JsonDocument getAndTouch(String id, int expiry)
Description copied from interface:BucketRetrieve and touch aJsonDocumentby its unique ID with the default key/value timeout. If the document is found, aJsonDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toBucket.get(String), but in addition it touches the document, which will reset its configured expiration time to the value provided. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getAndTouchin interfaceBucket- Parameters:
id- id the unique ID of the document.expiry- the new expiration time for the document.- Returns:
- the found
JsonDocumentor null.
-
getAndTouch
public JsonDocument getAndTouch(String id, int expiry, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieve and touch aJsonDocumentby its unique ID with the a custom timeout. If the document is found, aJsonDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toBucket.get(String), but in addition it touches the document, which will reset its configured expiration time to the value provided. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getAndTouchin interfaceBucket- Parameters:
id- id the unique ID of the document.expiry- the new expiration time for the document.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the found
JsonDocumentor null.
-
getAndTouch
public <D extends Document<?>> D getAndTouch(D document)
Description copied from interface:BucketRetrieve and touch aDocumentby its unique ID with the default key/value timeout. If the document is found, aDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toBucket.get(Document), but in addition it touches the document, which will reset its configured expiration time set on the given document itself. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getAndTouchin interfaceBucket- Parameters:
document- the source document from which the ID and expiry is taken and the type is inferred.- Returns:
- the found
Documentor null.
-
getAndTouch
public <D extends Document<?>> D getAndTouch(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieve and touch aDocumentby its unique ID with a custom timeout. If the document is found, aDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toBucket.get(Document), but in addition it touches the document, which will reset its configured expiration time set on the given document itself. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getAndTouchin interfaceBucket- Parameters:
document- the source document from which the ID and expiry is taken and the type is inferred.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the found
Documentor null.
-
getAndTouch
public <D extends Document<?>> D getAndTouch(String id, int expiry, Class<D> target)
Description copied from interface:BucketRetrieve and touch aDocumentby its unique ID with the default key/value timeout. This method differs fromBucket.getAndTouch(String, int)in that if a specificDocumenttype is passed in, the appropriateTranscoderwill be selected (and not JSON conversion). If the document is found, aJsonDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toBucket.get(String, Class), but in addition it touches the document, which will reset its configured expiration time to the value provided. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getAndTouchin interfaceBucket- Parameters:
id- id the unique ID of the document.expiry- the new expiration time for the document.target- the target document type to use.- Returns:
- the found
Documentor null.
-
getAndTouch
public <D extends Document<?>> D getAndTouch(String id, int expiry, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRetrieve and touch aDocumentby its unique ID with a custom timeout. This method differs fromBucket.getAndTouch(String, int)in that if a specificDocumenttype is passed in, the appropriateTranscoderwill be selected (and not JSON conversion). If the document is found, aJsonDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toBucket.get(String, Class), but in addition it touches the document, which will reset its configured expiration time to the value provided. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
getAndTouchin interfaceBucket- Parameters:
id- id the unique ID of the document.expiry- the new expiration time for the document.target- the target document type to use.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the found
Documentor null.
-
insert
public <D extends Document<?>> D insert(D document)
Description copied from interface:BucketInsert aDocumentif it does not exist already with the default key/value timeout. If the givenDocument(identified by its unique ID) already exists, the observable errors with aDocumentAlreadyExistsException. If the operation should also override the existingDocument,Bucket.upsert(Document)should be used instead. It will always either return a document or fail with an error. The returnedDocumentcontains original properties, but has the refreshed CAS value set. This operation will return successfully if theDocumenthas been acknowledged in the managed cache layer on the master server node. If increased data durability is a concern,Bucket.insert(Document, PersistTo, ReplicateTo)should be used instead. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The request content is too big:RequestTooBigException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
insert
public <D extends Document<?>> D insert(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketInsert aDocumentif it does not exist already with a custom timeout. If the givenDocument(identified by its unique ID) already exists, the observable errors with aDocumentAlreadyExistsException. If the operation should also override the existingDocument,Bucket.upsert(Document)should be used instead. It will always either return a document or fail with an error. The returnedDocumentcontains original properties, but has the refreshed CAS value set. This operation will return successfully if theDocumenthas been acknowledged in the managed cache layer on the master server node. If increased data durability is a concern,Bucket.insert(Document, PersistTo, ReplicateTo)should be used instead. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The request content is too big:RequestTooBigException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
insert
public <D extends Document<?>> D insert(D document, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:BucketInsert aDocumentif it does not exist already and watch for durability constraints with the default key/value timeout. This method works exactly likeBucket.insert(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original insert failed because the document is already stored:DocumentAlreadyExistsException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original insert has already happened, so the actual insert and the watching for durability constraints are two separate tasks internally.**
-
insert
public <D extends Document<?>> D insert(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketInsert aDocumentif it does not exist already and watch for durability constraints with a custom timeout. This method works exactly likeBucket.insert(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original insert failed because the document is already stored:DocumentAlreadyExistsException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original insert has already happened, so the actual insert and the watching for durability constraints are two separate tasks internally.**
-
insert
public <D extends Document<?>> D insert(D document, PersistTo persistTo)
Description copied from interface:BucketInsert aDocumentif it does not exist already and watch for durability constraints with the default key/value timeout. This method works exactly likeBucket.insert(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original insert failed because the document is already stored:DocumentAlreadyExistsException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original insert has already happened, so the actual insert and the watching for durability constraints are two separate tasks internally.**
-
insert
public <D extends Document<?>> D insert(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketInsert aDocumentif it does not exist already and watch for durability constraints with a custom timeout. This method works exactly likeBucket.insert(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original insert failed because the document is already stored:DocumentAlreadyExistsException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original insert has already happened, so the actual insert and the watching for durability constraints are two separate tasks internally.**
-
insert
public <D extends Document<?>> D insert(D document, ReplicateTo replicateTo)
Description copied from interface:BucketInsert aDocumentif it does not exist already and watch for durability constraints with the default key/value timeout. This method works exactly likeBucket.insert(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original insert failed because the document is already stored:DocumentAlreadyExistsException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original insert has already happened, so the actual insert and the watching for durability constraints are two separate tasks internally.**
-
insert
public <D extends Document<?>> D insert(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketInsert aDocumentif it does not exist already and watch for durability constraints with a custom timeout. This method works exactly likeBucket.insert(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original insert failed because the document is already stored:DocumentAlreadyExistsException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original insert has already happened, so the actual insert and the watching for durability constraints are two separate tasks internally.**
-
upsert
public <D extends Document<?>> D upsert(D document)
Description copied from interface:BucketInsert or overwrite aDocumentwith the default key/value timeout. If the givenDocument(identified by its unique ID) already exists, it will be overridden by the current one. The returnedDocumentcontains original properties, but has the refreshed CAS value set. Please note that this method will not use theDocument.cas()for optimistic concurrency checks. If this behavior is needed, theBucket.replace(Document)method needs to be used. This operation will return successfully if theDocumenthas been acknowledged in the managed cache layer on the master server node. If increased data durability is a concern,Bucket.upsert(Document, PersistTo, ReplicateTo)should be used instead. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The request content is too big:RequestTooBigException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
upsert
public <D extends Document<?>> D upsert(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketInsert or overwrite aDocumentwith a custom timeout. If the givenDocument(identified by its unique ID) already exists, it will be overridden by the current one. The returnedDocumentcontains original properties, but has the refreshed CAS value set. Please note that this method will not use theDocument.cas()for optimistic concurrency checks. If this behavior is needed, theBucket.replace(Document, long, TimeUnit)method needs to be used. This operation will return successfully if theDocumenthas been acknowledged in the managed cache layer on the master server node. If increased data durability is a concern,Bucket.upsert(Document, PersistTo, ReplicateTo)should be used instead. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The request content is too big:RequestTooBigException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
upsert
public <D extends Document<?>> D upsert(D document, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:BucketInsert or overwrite aDocumentand watch for durability constraints with the default key/value timeout. This method works exactly likeBucket.upsert(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. Please note that this method will not use theDocument.cas()for optimistic concurrency checks. If this behavior is needed, theBucket.replace(Document, PersistTo, ReplicateTo)method needs to be used. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original upsert has already happened, so the actual upsert and the watching for durability constraints are two separate tasks internally.**
-
upsert
public <D extends Document<?>> D upsert(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketInsert or overwrite aDocumentand watch for durability constraints with a custom timeout. This method works exactly likeBucket.upsert(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. Please note that this method will not use theDocument.cas()for optimistic concurrency checks. If this behavior is needed, theBucket.replace(Document, PersistTo, ReplicateTo, long, TimeUnit)method needs to be used. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original upsert has already happened, so the actual upsert and the watching for durability constraints are two separate tasks internally.**
-
upsert
public <D extends Document<?>> D upsert(D document, PersistTo persistTo)
Description copied from interface:BucketInsert or overwrite aDocumentand watch for durability constraints with the default key/value timeout. This method works exactly likeBucket.upsert(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. Please note that this method will not use theDocument.cas()for optimistic concurrency checks. If this behavior is needed, theBucket.replace(Document, PersistTo)method needs to be used. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original upsert has already happened, so the actual upsert and the watching for durability constraints are two separate tasks internally.**
-
upsert
public <D extends Document<?>> D upsert(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketInsert or overwrite aDocumentand watch for durability constraints with a custom timeout. This method works exactly likeBucket.upsert(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. Please note that this method will not use theDocument.cas()for optimistic concurrency checks. If this behavior is needed, theBucket.replace(Document, PersistTo, long, TimeUnit)method needs to be used. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original upsert has already happened, so the actual upsert and the watching for durability constraints are two separate tasks internally.**
-
upsert
public <D extends Document<?>> D upsert(D document, ReplicateTo replicateTo)
Description copied from interface:BucketInsert or overwrite aDocumentand watch for durability constraints with the default key/value timeout. This method works exactly likeBucket.upsert(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. Please note that this method will not use theDocument.cas()for optimistic concurrency checks. If this behavior is needed, theBucket.replace(Document, ReplicateTo)method needs to be used. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original upsert has already happened, so the actual upsert and the watching for durability constraints are two separate tasks internally.**
-
upsert
public <D extends Document<?>> D upsert(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketInsert or overwrite aDocumentand watch for durability constraints with a custom timeout. This method works exactly likeBucket.upsert(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. Please note that this method will not use theDocument.cas()for optimistic concurrency checks. If this behavior is needed, theBucket.replace(Document, ReplicateTo, long, TimeUnit)method needs to be used. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original upsert has already happened, so the actual upsert and the watching for durability constraints are two separate tasks internally.**
-
replace
public <D extends Document<?>> D replace(D document)
Description copied from interface:BucketReplace aDocumentif it does already exist with the default key/value timeout. If the givenDocument(identified by its unique ID) does not exist already, the method errors with aDocumentDoesNotExistException. If the operation should also insert theDocument,Bucket.upsert(Document)should be used instead. It will always either return a document or fail with an error. The returnedDocumentcontains original properties, but has the refreshed CAS value set. This operation will return successfully if theDocumenthas been acknowledged in the managed cache layer on the master server node. If increased data durability is a concern,Bucket.replace(Document, PersistTo, ReplicateTo)should be used instead. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original replace failed because the document does not exist:DocumentDoesNotExistException- The request content is too big:RequestTooBigException- A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
replace
public <D extends Document<?>> D replace(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketReplace aDocumentif it does already exist with a custom timeout. If the givenDocument(identified by its unique ID) does not exist already, the method errors with aDocumentDoesNotExistException. If the operation should also insert theDocument,Bucket.upsert(Document)should be used instead. It will always either return a document or fail with an error. The returnedDocumentcontains original properties, but has the refreshed CAS value set. This operation will return successfully if theDocumenthas been acknowledged in the managed cache layer on the master server node. If increased data durability is a concern,Bucket.replace(Document, PersistTo, ReplicateTo)should be used instead. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original replace failed because the document does not exist:DocumentDoesNotExistException- The request content is too big:RequestTooBigException- A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
replace
public <D extends Document<?>> D replace(D document, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:BucketReplace aDocumentif it does exist and watch for durability constraints with the default key/value timeout. This method works exactly likeBucket.replace(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original replace failed because the document does not exist:DocumentDoesNotExistException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original replace has already happened, so the actual replace and the watching for durability constraints are two separate tasks internally.**
-
replace
public <D extends Document<?>> D replace(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketReplace aDocumentif it does exist and watch for durability constraints with a custom timeout. This method works exactly likeBucket.replace(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original replace failed because the document does not exist:DocumentDoesNotExistException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original replace has already happened, so the actual replace and the watching for durability constraints are two separate tasks internally.**
-
replace
public <D extends Document<?>> D replace(D document, PersistTo persistTo)
Description copied from interface:BucketReplace aDocumentif it does exist and watch for durability constraints with the default key/value timeout. This method works exactly likeBucket.replace(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original replace failed because the document does not exist:DocumentDoesNotExistException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original replace has already happened, so the actual replace and the watching for durability constraints are two separate tasks internally.**
-
replace
public <D extends Document<?>> D replace(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketReplace aDocumentif it does exist and watch for durability constraints with a custom timeout. This method works exactly likeBucket.replace(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original replace failed because the document does not exist:DocumentDoesNotExistException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original replace has already happened, so the actual replace and the watching for durability constraints are two separate tasks internally.**
-
replace
public <D extends Document<?>> D replace(D document, ReplicateTo replicateTo)
Description copied from interface:BucketReplace aDocumentif it does exist and watch for durability constraints with the default key/value timeout. This method works exactly likeBucket.replace(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original replace failed because the document does not exist:DocumentDoesNotExistException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original replace has already happened, so the actual replace and the watching for durability constraints are two separate tasks internally.**
-
replace
public <D extends Document<?>> D replace(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketReplace aDocumentif it does exist and watch for durability constraints with a custom timeout. This method works exactly likeBucket.replace(Document), but afterwards watches the server states if the given durability constraints are met. If this is the case, a new document is returned which contains the original properties, but has the refreshed CAS value set. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The original replace failed because the document does not exist:DocumentDoesNotExistException- The request content is too big:RequestTooBigException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original replace has already happened, so the actual replace and the watching for durability constraints are two separate tasks internally.**
-
remove
public <D extends Document<?>> D remove(D document)
Description copied from interface:BucketRemoves aDocumentfrom the Server with the default key/value timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- A CAS value was set on theDocumentand it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public <D extends Document<?>> D remove(D document, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:BucketRemoves aDocumentfrom the Server and apply a durability requirement with the default key/value timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set on theDocumentand it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public <D extends Document<?>> D remove(D document, PersistTo persistTo)
Description copied from interface:BucketRemoves aDocumentfrom the Server and apply a durability requirement with the default key/value timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set on theDocumentand it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public <D extends Document<?>> D remove(D document, ReplicateTo replicateTo)
Description copied from interface:BucketRemoves aDocumentfrom the Server and apply a durability requirement with the default key/value timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set on theDocumentand it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public <D extends Document<?>> D remove(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves aDocumentfrom the Server with a custom timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- A CAS value was set on theDocumentand it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public <D extends Document<?>> D remove(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves aDocumentfrom the Server and apply a durability requirement with a custom timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set on theDocumentand it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
removein interfaceBucket- Parameters:
document- the document to remove, with the ID extracted.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the document containing the ID.
-
remove
public <D extends Document<?>> D remove(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves aDocumentfrom the Server and apply a durability requirement with a custom timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set on theDocumentand it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public <D extends Document<?>> D remove(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves aDocumentfrom the Server and apply a durability requirement with a custom timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set on theDocumentand it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public JsonDocument remove(String id)
Description copied from interface:BucketRemoves aDocumentfrom the Server identified by its ID with the default key/value timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public JsonDocument remove(String id, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:BucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement with the default key/value timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public JsonDocument remove(String id, PersistTo persistTo)
Description copied from interface:BucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement with the default key/value timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public JsonDocument remove(String id, ReplicateTo replicateTo)
Description copied from interface:BucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement with the default key/value timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public JsonDocument remove(String id, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves aDocumentfrom the Server identified by its ID with a custom timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public JsonDocument remove(String id, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement with a custom timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public JsonDocument remove(String id, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement with a custom timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public JsonDocument remove(String id, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement with a custom timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public <D extends Document<?>> D remove(String id, Class<D> target)
Description copied from interface:BucketRemoves aDocumentfrom the Server identified by its ID with the default key/value timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public <D extends Document<?>> D remove(String id, PersistTo persistTo, ReplicateTo replicateTo, Class<D> target)
Description copied from interface:BucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement with the default key/value timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public <D extends Document<?>> D remove(String id, PersistTo persistTo, Class<D> target)
Description copied from interface:BucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement with the default key/value timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public <D extends Document<?>> D remove(String id, ReplicateTo replicateTo, Class<D> target)
Description copied from interface:BucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement with the default key/value timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public <D extends Document<?>> D remove(String id, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves aDocumentfrom the Server identified by its ID with a custom timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public <D extends Document<?>> D remove(String id, PersistTo persistTo, ReplicateTo replicateTo, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement with a custom timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
removein interfaceBucket- Parameters:
id- the id of the document to remove.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.target- the target document type to use.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the document containing the ID.
-
remove
public <D extends Document<?>> D remove(String id, PersistTo persistTo, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement with a custom timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
remove
public <D extends Document<?>> D remove(String id, ReplicateTo replicateTo, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement with a custom timeout. TheDocumentreturned just has the document ID and its CAS value set, since the value and all other associated properties have been removed from the server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The document to remove does not exist:DocumentDoesNotExistException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
query
public ViewResult query(ViewQuery query)
Description copied from interface:BucketQueries a Couchbase ServerViewwith thedefault view timeout. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the design document or view is not found:ViewDoesNotExistException
-
query
public N1qlQueryResult query(Statement statement)
Description copied from interface:BucketQueries a N1QL secondary index with thedefault query timeout. Said timeout includes the time it takes to retrieve all of the rows and errors from server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException
-
query
public N1qlQueryResult query(N1qlQuery query)
Description copied from interface:BucketQueries a N1QL secondary index with thedefault query timeout. Said timeout includes the time it takes to retrieve all of the rows and errors from server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException
-
query
public SearchQueryResult query(SearchQuery query)
Description copied from interface:BucketQueries a Full-Text Index This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException
-
query
public SearchQueryResult query(SearchQuery query, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketQueries a Full-Text Index This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException
-
query
public AnalyticsQueryResult query(AnalyticsQuery query)
Description copied from interface:BucketQueries Couchbase Analytics
-
query
public AnalyticsQueryResult query(AnalyticsQuery query, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketQueries Couchbase Analytics
-
query
public SpatialViewResult query(SpatialViewQuery query)
Description copied from interface:BucketQueries a Couchbase Server SpatialViewwith thedefault view timeout. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the design document or view is not found:ViewDoesNotExistException
-
query
public ViewResult query(ViewQuery query, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketQueries a Couchbase ServerViewwith a custom timeout. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the design document or view is not found:ViewDoesNotExistException
-
query
public SpatialViewResult query(SpatialViewQuery query, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketQueries a Couchbase Server SpatialViewwith a custom timeout. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the design document or view is not found:ViewDoesNotExistException
-
query
public N1qlQueryResult query(Statement statement, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketQueries a N1QL secondary index with a custom timeout. Said timeout includes the time it takes to retrieve all of the rows and errors from server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- Specified by:
queryin interfaceBucket- Parameters:
statement- the statement in a DSL form (start with a static select() import)timeout- the custom full timeout, including the time to retrieve all rows, errors, etc...timeUnit- the unit for the timeout.- Returns:
- a result containing all found rows and additional information.
-
query
public N1qlQueryResult query(N1qlQuery query, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketQueries a N1QL secondary index with a custom timeout. Said timeout includes the time it takes to retrieve all of the rows and errors from server. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- Specified by:
queryin interfaceBucket- Parameters:
query- the fullN1qlQuery, including statement and any other additional parameter.timeout- the custom full timeout, including the time to retrieve all rows, errors, etc...timeUnit- the unit for the timeout.- Returns:
- a result containing all found rows and additional information.
-
unlock
public Boolean unlock(String id, long cas)
Description copied from interface:BucketUnlocks a write-lockedDocumentwith the default key/value timeout. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The document does not exist:DocumentDoesNotExistException- A transient error occurred, most probably the CAS value was not correct:TemporaryLockFailureException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
unlock
public <D extends Document<?>> Boolean unlock(D document)
Description copied from interface:BucketUnlocks a write-lockedDocumentwith the default key/value timeout. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The document does not exist:DocumentDoesNotExistException- A transient error occurred, most probably the CAS value was not correct:TemporaryLockFailureException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
unlock
public Boolean unlock(String id, long cas, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketUnlocks a write-lockedDocumentwith a custom timeout. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The document does not exist:DocumentDoesNotExistException- A transient error occurred, most probably the CAS value was not correct:TemporaryLockFailureException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
unlock
public <D extends Document<?>> Boolean unlock(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketUnlocks a write-lockedDocumentwith a custom timeout. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The document does not exist:DocumentDoesNotExistException- A transient error occurred, most probably the CAS value was not correct:TemporaryLockFailureException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
touch
public Boolean touch(String id, int expiry)
Description copied from interface:BucketRenews the expiration time of aDocumentwith the default key/value timeout. Compared toBucket.getAndTouch(Document), this method does not actually fetch the document from the server, but it just resets its expiration time to the given value. This method throws under the following conditions: - The document doesn't exist:DocumentDoesNotExistException- The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
touch
public <D extends Document<?>> Boolean touch(D document)
Description copied from interface:BucketRenews the expiration time of aDocumentwith the default key/value timeout. Compared toBucket.getAndTouch(Document), this method does not actually fetch the document from the server, but it just resets its expiration time to the given value. This method throws under the following conditions: - The document doesn't exist:DocumentDoesNotExistException- The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
touch
public Boolean touch(String id, int expiry, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRenews the expiration time of aDocumentwith a custom timeout. Compared toBucket.getAndTouch(Document), this method does not actually fetch the document from the server, but it just resets its expiration time to the given value. This method throws under the following conditions: - The document doesn't exist:DocumentDoesNotExistException- The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
touch
public <D extends Document<?>> Boolean touch(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRenews the expiration time of aDocumentwith a custom timeout. Compared toBucket.getAndTouch(Document), this method does not actually fetch the document from the server, but it just resets its expiration time to the given value. This method throws under the following conditions: - The document doesn't exist:DocumentDoesNotExistException- The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
counter
public JsonLongDocument counter(String id, long delta)
Description copied from interface:BucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet with the default kvTimeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- If the document does not exist:DocumentDoesNotExistException. - Unexpected errors are caught and contained in a genericCouchbaseException.
-
counter
public JsonLongDocument counter(String id, long delta, long initial)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
counter
public JsonLongDocument counter(String id, long delta, long initial, int expiry)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout. This method allows to set an expiration time for the document as well. It is not allowed that the delta value will bring the actual value below zero. *Note*: Right now it is only possible to set the TTL of the counter document when it is created, not when it is updated! If this behavior is needed, please refer to the subdocument API and use the JSON based counters! The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
counter
public JsonLongDocument counter(String id, long delta, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet with a custom timeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- If the document does not exist:DocumentDoesNotExistException. - Unexpected errors are caught and contained in a genericCouchbaseException.
-
counter
public JsonLongDocument counter(String id, long delta, long initial, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with a custom timeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
counter
public JsonLongDocument counter(String id, long delta, long initial, int expiry, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with a custom timeout. This method allows to set an expiration time for the document as well. It is not allowed that the delta value will bring the actual value below zero. *Note*: Right now it is only possible to set the TTL of the counter document when it is created, not when it is updated! If this behavior is needed, please refer to the subdocument API and use the JSON based counters! The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
counterin interfaceBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value.expiry- the new expiration time for the document, only used on creation.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
bucketManager
public BucketManager bucketManager()
Description copied from interface:BucketProvides access to theBucketManagerfor administrative access. The manager lets you perform operations such as flushing a bucket or creating and managing design documents.- Specified by:
bucketManagerin interfaceBucket- Returns:
- the bucket manager for administrative operations.
-
append
public <D extends Document<?>> D append(D document)
Description copied from interface:BucketAppend aDocuments content to an existing one with the default key/value timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the appended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
prepend
public <D extends Document<?>> D prepend(D document)
Description copied from interface:BucketPrepend aDocuments content to an existing one with the default key/value timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the prepended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
append
public <D extends Document<?>> D append(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketAppend aDocuments content to an existing one with a custom timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the appended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
prepend
public <D extends Document<?>> D prepend(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketPrepend aDocuments content to an existing one with a custom timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the prepended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
counter
public JsonLongDocument counter(String id, long delta, PersistTo persistTo)
Description copied from interface:BucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet with the default kvTimeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - If the document does not exist:DocumentDoesNotExistException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**
-
counter
public JsonLongDocument counter(String id, long delta, ReplicateTo replicateTo)
Description copied from interface:BucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet with the default kvTimeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - If the document does not exist:DocumentDoesNotExistException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**
-
counter
public JsonLongDocument counter(String id, long delta, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:BucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet with the default kvTimeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - If the document does not exist:DocumentDoesNotExistException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**
-
counter
public JsonLongDocument counter(String id, long delta, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet with a custom timeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - If the document does not exist:DocumentDoesNotExistException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**
-
counter
public JsonLongDocument counter(String id, long delta, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet with a custom timeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - If the document does not exist:DocumentDoesNotExistException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**
-
counter
public JsonLongDocument counter(String id, long delta, long initial, PersistTo persistTo)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**
-
counter
public JsonLongDocument counter(String id, long delta, long initial, ReplicateTo replicateTo)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**
-
counter
public JsonLongDocument counter(String id, long delta, long initial, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**- Specified by:
counterin interfaceBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public JsonLongDocument counter(String id, long delta, long initial, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with a custom timeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**- Specified by:
counterin interfaceBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value.persistTo- the persistence constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public JsonLongDocument counter(String id, long delta, long initial, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with a custom timeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**- Specified by:
counterin interfaceBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public JsonLongDocument counter(String id, long delta, long initial, int expiry, PersistTo persistTo)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout. This method allows to set an expiration time for the document as well. It is not allowed that the delta value will bring the actual value below zero. *Note*: Right now it is only possible to set the TTL of the counter document when it is created, not when it is updated! If this behavior is needed, please refer to the subdocument API and use the JSON based counters! The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**- Specified by:
counterin interfaceBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value.expiry- the new expiration time for the document, only used on creation.persistTo- the persistence constraint to watch.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public JsonLongDocument counter(String id, long delta, long initial, int expiry, ReplicateTo replicateTo)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout. This method allows to set an expiration time for the document as well. It is not allowed that the delta value will bring the actual value below zero. *Note*: Right now it is only possible to set the TTL of the counter document when it is created, not when it is updated! If this behavior is needed, please refer to the subdocument API and use the JSON based counters! The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**- Specified by:
counterin interfaceBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value.expiry- the new expiration time for the document, only used on creation.replicateTo- the replication constraint to watch.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public JsonLongDocument counter(String id, long delta, long initial, int expiry, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with the default key/value timeout. This method allows to set an expiration time for the document as well. It is not allowed that the delta value will bring the actual value below zero. *Note*: Right now it is only possible to set the TTL of the counter document when it is created, not when it is updated! If this behavior is needed, please refer to the subdocument API and use the JSON based counters! The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**- Specified by:
counterin interfaceBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value.expiry- the new expiration time for the document, only used on creation.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public JsonLongDocument counter(String id, long delta, long initial, int expiry, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with a custom timeout. This method allows to set an expiration time for the document as well. It is not allowed that the delta value will bring the actual value below zero. *Note*: Right now it is only possible to set the TTL of the counter document when it is created, not when it is updated! If this behavior is needed, please refer to the subdocument API and use the JSON based counters! The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**- Specified by:
counterin interfaceBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value.expiry- the new expiration time for the document, only used on creation.persistTo- the persistence constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public JsonLongDocument counter(String id, long delta, long initial, int expiry, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with a custom timeout. This method allows to set an expiration time for the document as well. It is not allowed that the delta value will bring the actual value below zero. *Note*: Right now it is only possible to set the TTL of the counter document when it is created, not when it is updated! If this behavior is needed, please refer to the subdocument API and use the JSON based counters! The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**- Specified by:
counterin interfaceBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value.expiry- the new expiration time for the document, only used on creation.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public JsonLongDocument counter(String id, long delta, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet with a custom timeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - If the document does not exist:DocumentDoesNotExistException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**- Specified by:
counterin interfaceBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public JsonLongDocument counter(String id, long delta, long initial, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with a custom timeout. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**- Specified by:
counterin interfaceBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public JsonLongDocument counter(String id, long delta, long initial, int expiry, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketIncrement or decrement a counter with the given value and a initial value if it does not exist with a custom timeout. This method allows to set an expiration time for the document as well. It is not allowed that the delta value will bring the actual value below zero. *Note*: Right now it is only possible to set the TTL of the counter document when it is created, not when it is updated! If this behavior is needed, please refer to the subdocument API and use the JSON based counters! The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingBucket.upsert(D)withJsonLongDocument. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original increment/decrement has already happened, so the actual increment/decrement and the watching for durability constraints are two separate tasks internally.**- Specified by:
counterin interfaceBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value.expiry- the new expiration time for the document, only used on creation.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
append
public <D extends Document<?>> D append(D document, PersistTo persistTo)
Description copied from interface:BucketAppend aDocuments content to an existing one with the default key/value timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the appended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original append has already happened, so the actual append and the watching for durability constraints are two separate tasks internally.**
-
append
public <D extends Document<?>> D append(D document, ReplicateTo replicateTo)
Description copied from interface:BucketAppend aDocuments content to an existing one with the default key/value timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the appended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original append has already happened, so the actual append and the watching for durability constraints are two separate tasks internally.**
-
append
public <D extends Document<?>> D append(D document, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:BucketAppend aDocuments content to an existing one with the default key/value timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the appended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original append has already happened, so the actual append and the watching for durability constraints are two separate tasks internally.**- Specified by:
appendin interfaceBucket- Parameters:
document- the document, identified by its id, from which the content is appended to the existing one.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.- Returns:
- a document which mirrors the one supplied as an argument.
-
append
public <D extends Document<?>> D append(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketAppend aDocuments content to an existing one with a custom timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the appended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original append has already happened, so the actual append and the watching for durability constraints are two separate tasks internally.**- Specified by:
appendin interfaceBucket- Parameters:
document- the document, identified by its id, from which the content is appended to the existing one.persistTo- the persistence constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a document which mirrors the one supplied as an argument.
-
append
public <D extends Document<?>> D append(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketAppend aDocuments content to an existing one with a custom timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the appended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original append has already happened, so the actual append and the watching for durability constraints are two separate tasks internally.**- Specified by:
appendin interfaceBucket- Parameters:
document- the document, identified by its id, from which the content is appended to the existing one.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a document which mirrors the one supplied as an argument.
-
append
public <D extends Document<?>> D append(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketAppend aDocuments content to an existing one with a custom timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the appended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original append has already happened, so the actual append and the watching for durability constraints are two separate tasks internally.**- Specified by:
appendin interfaceBucket- Parameters:
document- the document, identified by its id, from which the content is appended to the existing one.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a document which mirrors the one supplied as an argument.
-
prepend
public <D extends Document<?>> D prepend(D document, PersistTo persistTo)
Description copied from interface:BucketPrepend aDocuments content to an existing one with the default key/value timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the prepended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original prepend has already happened, so the actual prepend and the watching for durability constraints are two separate tasks internally.**
-
prepend
public <D extends Document<?>> D prepend(D document, ReplicateTo replicateTo)
Description copied from interface:BucketPrepend aDocuments content to an existing one with the default key/value timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the prepended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original prepend has already happened, so the actual prepend and the watching for durability constraints are two separate tasks internally.**
-
prepend
public <D extends Document<?>> D prepend(D document, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:BucketPrepend aDocuments content to an existing one with the default key/value timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the prepended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original prepend has already happened, so the actual prepend and the watching for durability constraints are two separate tasks internally.**- Specified by:
prependin interfaceBucket- Parameters:
document- the document, identified by its id, from which the content is prepended to the existing one.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.- Returns:
- a document which mirrors the one supplied as an argument.
-
prepend
public <D extends Document<?>> D prepend(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketPrepend aDocuments content to an existing one with a custom timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the prepended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original prepend has already happened, so the actual prepend and the watching for durability constraints are two separate tasks internally.**- Specified by:
prependin interfaceBucket- Parameters:
document- the document, identified by its id, from which the content is prepended to the existing one.persistTo- the persistence constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a document which mirrors the one supplied as an argument.
-
prepend
public <D extends Document<?>> D prepend(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketPrepend aDocuments content to an existing one with a custom timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the prepended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original prepend has already happened, so the actual prepend and the watching for durability constraints are two separate tasks internally.**- Specified by:
prependin interfaceBucket- Parameters:
document- the document, identified by its id, from which the content is prepended to the existing one.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a document which mirrors the one supplied as an argument.
-
prepend
public <D extends Document<?>> D prepend(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketPrepend aDocuments content to an existing one with a custom timeout. TheDocumentreturned explicitly has theDocument.content()set to null, because the server does not return the prepended result, so at this point the client does not know how theDocumentnow looks like. A separateBucket.get(Document)call needs to be issued in order to get the full current content. If theDocumentdoes not exist, it needs to be created upfront. Note thatJsonDocuments in all forms are not supported, it is advised that the following ones are used: -LegacyDocument-StringDocument-BinaryDocumentNote that this method does not support expiration on theDocument. If set, it will be ignored. This method throws under the following conditions: - The operation takes longer than the specified timeout:TimeoutExceptionwrapped in aRuntimeException- The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The request content is too big:RequestTooBigException- If the document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - Unexpected errors are caught and contained in a genericCouchbaseException. ADurabilityExceptiontypically happens if the given amount of replicas needed to fulfill the durability constraint cannot be met because either the bucket does not have enough replicas configured or they are not available in a failover event. As an example, if one replica is configured andReplicateTo.TWOis used, the observable is errored with aDurabilityException. The same can happen if one replica is configured, but one node has been failed over and not yet rebalanced (hence, on a subset of the partitions there is no replica available). **It is important to understand that the original prepend has already happened, so the actual prepend and the watching for durability constraints are two separate tasks internally.**- Specified by:
prependin interfaceBucket- Parameters:
document- the document, identified by its id, from which the content is prepended to the existing one.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a document which mirrors the one supplied as an argument.
-
lookupIn
public LookupInBuilder lookupIn(String docId)
Description copied from interface:BucketPrepare a sub-document lookup through abuilder API. You can use the builder to describe one or several lookup operations inside an existingJsonDocument, then execute the lookup synchronously by calling theLookupInBuilder.execute()method. Only the paths that you looked up inside the document will be transferred over the wire, limiting the network overhead for large documents.- Specified by:
lookupInin interfaceBucket- Parameters:
docId- the id of the JSON document to lookup in.- Returns:
- a builder to describe the lookup(s) to perform.
- See Also:
LookupInBuilder.execute()
-
mutateIn
public MutateInBuilder mutateIn(String docId)
Description copied from interface:BucketPrepare a sub-document mutation through abuilder API. You can use the builder to describe one or several mutation operations inside an existingJsonDocument, then execute them synchronously by calling theMutateInBuilder.execute()method. Only the values that you want mutated inside the document will be transferred over the wire, limiting the network overhead for large documents. A get followed by a replace of the whole document isn't needed anymore. Note that you can set the expiry, check the CAS and ask for durability constraints in the builder using methods prefixed by "with":withExpiry,withCas,withDurability.- Specified by:
mutateInin interfaceBucket- Parameters:
docId- the id of the JSON document to mutate in.- Returns:
- a builder to describe the mutation(s) to perform.
- See Also:
MutateInBuilder.execute()
-
mapAdd
public <V> boolean mapAdd(String docId, String key, V value)
Description copied from interface:BucketAdd a key value pair into CouchbaseMap If the underlying document for the map does not exist, this operation will create a new document to back the data structure. This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
mapAdd
public <V> boolean mapAdd(String docId, String key, V value, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketAdd a key value pair into CouchbaseMap If the underlying document for the map does not exist, this operation will create a new document to back the data structure. This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
mapAdd
public <V> boolean mapAdd(String docId, String key, V value, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:BucketAdd a key value pair into CouchbaseMap with additional mutation options provided byMutationOptionBuilderIf the underlying document for the map does not exist, this operation will create a new document to back the data structure. This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
mapAddin interfaceBucket- Parameters:
docId- document id backing the mapkey- key to be storedvalue- value to be storedmutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- true if successful
-
mapAdd
public <V> boolean mapAdd(String docId, String key, V value, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketAdd a key value pair into CouchbaseMap with additional mutation options provided byMutationOptionBuilderIf the underlying document for the map does not exist, this operation will create a new document to back the data structure. This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
mapAddin interfaceBucket- Parameters:
docId- document id backing the mapkey- key to be storedvalue- value to be storedmutationOptionBuilder- mutation optionsMutationOptionBuildertimeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- true if successful
-
mapGet
public <V> V mapGet(String docId, String key, Class<V> valueType)
Description copied from interface:BucketGet value of a key in the CouchbaseMap This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the key is not found in the mapPathNotFoundException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
mapGet
public <V> V mapGet(String docId, String key, Class<V> valueType, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketGet value of a key in the CouchbaseMap This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
mapRemove
public boolean mapRemove(String docId, String key)
Description copied from interface:BucketRemove a key value pair from CouchbaseMap This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
mapRemove
public boolean mapRemove(String docId, String key, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemove a key value pair from CouchbaseMap This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
mapRemove
public boolean mapRemove(String docId, String key, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:BucketRemove a key value pair from CouchbaseMap with additional mutation options provided byMutationOptionBuilder. This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
mapRemove
public boolean mapRemove(String docId, String key, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemove a key value pair from CouchbaseMap with additional mutation options provided byMutationOptionBuilder. This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
mapSize
public int mapSize(String docId)
Description copied from interface:BucketReturns the number key value pairs in CouchbaseMap This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
mapSize
public int mapSize(String docId, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketReturns the number key value pairs in CouchbaseMap This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
listGet
public <E> E listGet(String docId, int index, Class<E> elementType)
Description copied from interface:BucketGet element at an index in the CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the index is not found in the listPathNotFoundException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
listGet
public <E> E listGet(String docId, int index, Class<E> elementType, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketGet element at an index in the CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
listAppend
public <E> boolean listAppend(String docId, E element)
Description copied from interface:BucketPush an element to tail of CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listAppendin interfaceBucket- Parameters:
docId- document id backing the listelement- element to be pushed into the queue- Returns:
- true if successful
-
listAppend
public <E> boolean listAppend(String docId, E element, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketPush an element to tail of CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listAppendin interfaceBucket- Parameters:
docId- document id backing the listelement- element to be pushed into the queuetimeout- the custom timeouttimeUnit- the unit for the timeout- Returns:
- true if successful
-
listAppend
public <E> boolean listAppend(String docId, E element, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:BucketPush an element to tail of CouchbaseList with additional mutation options provided byMutationOptionBuilder. This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - If the underlying couchbase document does not exist:DocumentDoesNotExistException- A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listAppendin interfaceBucket- Parameters:
docId- document id backing the listelement- element to be pushed into the queuemutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- true if successful
-
listAppend
public <E> boolean listAppend(String docId, E element, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketPush an element to tail of CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - If the underlying couchbase document does not exist:DocumentDoesNotExistException- A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listAppendin interfaceBucket- Parameters:
docId- document id backing the listelement- element to be pushed into the queuemutationOptionBuilder- mutation optionsMutationOptionBuildertimeout- the custom timeouttimeUnit- the unit for the timeout- Returns:
- true if successful
-
listPrepend
public <E> boolean listPrepend(String docId, E element)
Description copied from interface:BucketShift list head to element in CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - If the underlying couchbase document does not exist:DocumentDoesNotExistException- A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listPrependin interfaceBucket- Parameters:
docId- document id backing the listelement- element to shift as head of list- Returns:
- true if successful
-
listPrepend
public <E> boolean listPrepend(String docId, E element, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketShift list head to element in CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listPrependin interfaceBucket- Parameters:
docId- document id backing the listelement- element to shift as head of listtimeout- the custom timeouttimeUnit- the unit for the timeout- Returns:
- true if successful
-
listPrepend
public <E> boolean listPrepend(String docId, E element, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:BucketShift list head to element in CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listPrependin interfaceBucket- Parameters:
docId- document id backing the listelement- element to shift as head of listmutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- true if successful
-
listPrepend
public <E> boolean listPrepend(String docId, E element, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketShift list head to element in CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listPrependin interfaceBucket- Parameters:
docId- document id backing the listelement- element to shift as head of listmutationOptionBuilder- mutation optionsMutationOptionBuildertimeout- the custom timeouttimeUnit- the unit for the timeout- Returns:
- true if successful
-
listRemove
public boolean listRemove(String docId, int index)
Description copied from interface:BucketRemove an element from an index in CouchbaseList This method throws under the following conditions: -IndexOutOfBoundsExceptionif index is not found - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listRemovein interfaceBucket- Parameters:
docId- document id backing the listindex- index of the element in list- Returns:
- true if successful
-
listRemove
public boolean listRemove(String docId, int index, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemove an element from an index in CouchbaseList This method throws under the following conditions: -IndexOutOfBoundsExceptionif index is not found - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listRemovein interfaceBucket- Parameters:
docId- document id backing the listindex- index of the element in listtimeout- the custom timeouttimeUnit- the unit for the timeout- Returns:
- true if successful
-
listRemove
public boolean listRemove(String docId, int index, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:BucketRemove an element from an index in CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: -IndexOutOfBoundsExceptionif index is not found - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listRemovein interfaceBucket- Parameters:
docId- document id backing the listindex- index of the element in listmutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- true if successful
-
listRemove
public boolean listRemove(String docId, int index, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemove an element from an index in CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: -IndexOutOfBoundsExceptionif index is not found - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listRemovein interfaceBucket- Parameters:
docId- document id backing the listindex- index of the element in listmutationOptionBuilder- mutation optionsMutationOptionBuildertimeout- the custom timeouttimeUnit- the unit for the timeout- Returns:
- true if successful
-
listSet
public <E> boolean listSet(String docId, int index, E element)
Description copied from interface:BucketAdd an element at an index in CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
listSet
public <E> boolean listSet(String docId, int index, E element, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketAdd an element at an index in CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
listSet
public <E> boolean listSet(String docId, int index, E element, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:BucketAdd an element at an index in CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listSetin interfaceBucket- Parameters:
docId- document id backing the listindex- index in the listelement- element to be addedmutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- true if successful
-
listSet
public <E> boolean listSet(String docId, int index, E element, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketAdd an element at an index in CouchbaseList with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
listSetin interfaceBucket- Parameters:
docId- document id backing the listindex- index in the listelement- element to be addedmutationOptionBuilder- mutation optionsMutationOptionBuildertimeout- the custom timeouttimeUnit- the unit for the timeout- Returns:
- true if successful
-
listSize
public int listSize(String docId)
Description copied from interface:BucketReturns the number of elements in CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
listSize
public int listSize(String docId, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketReturns the number of elements in CouchbaseList This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
setAdd
public <E> boolean setAdd(String docId, E element)
Description copied from interface:BucketAdd an element into CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
setAdd
public <E> boolean setAdd(String docId, E element, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketAdd an element into CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
setAdd
public <E> boolean setAdd(String docId, E element, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:BucketAdd an element into CouchbaseSet with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
setAddin interfaceBucket- Parameters:
docId- document id backing the setelement- element to be pushed into the setmutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- true if successful, false if the element exists in set
-
setAdd
public <E> boolean setAdd(String docId, E element, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketAdd an element into CouchbaseSet with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
setAddin interfaceBucket- Parameters:
docId- document id backing the setelement- element to be pushed into the setmutationOptionBuilder- mutation optionsMutationOptionBuildertimeout- the custom timeouttimeUnit- the unit for the timeout- Returns:
- true if successful, false if the element exists in set
-
setContains
public <E> boolean setContains(String docId, E element)
Description copied from interface:BucketCheck if an element exists in CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
setContainsin interfaceBucket- Parameters:
docId- document id backing the setelement- element to check for existence- Returns:
- true if element exists, false if the element does not exist
-
setContains
public <E> boolean setContains(String docId, E element, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketCheck if an element exists in CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
setContainsin interfaceBucket- Parameters:
docId- document id backing the setelement- element to check for existencetimeout- the custom timeouttimeUnit- the unit for the timeout- Returns:
- true if element exists, false if the element does not exist
-
setRemove
public <E> E setRemove(String docId, E element)
Description copied from interface:BucketRemoves an element from CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
setRemove
public <E> E setRemove(String docId, E element, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves an element from CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
setRemove
public <E> E setRemove(String docId, E element, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:BucketRemoves an element from CouchbaseSet with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
setRemovein interfaceBucket- Parameters:
docId- document id backing the setelement- element to be removedmutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- element removed from set (fails silently by returning the element is not found in set)
-
setRemove
public <E> E setRemove(String docId, E element, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves an element from CouchbaseSet with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
setRemovein interfaceBucket- Parameters:
docId- document id backing the setelement- element to be removedmutationOptionBuilder- mutation optionsMutationOptionBuildertimeout- the custom timeouttimeUnit- the unit for the timeout- Returns:
- element removed from set (fails silently by returning the element is not found in set)
-
setSize
public int setSize(String docId)
Description copied from interface:BucketReturns the number of elements in CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
setSize
public int setSize(String docId, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketReturns the number of elements in CouchbaseSet This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
queuePush
public <E> boolean queuePush(String docId, E element)
Description copied from interface:BucketAdd an element into CouchbaseQueue This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
queuePush
public <E> boolean queuePush(String docId, E element, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketAdd an element into CouchbaseQueue This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
queuePush
public <E> boolean queuePush(String docId, E element, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:BucketAdd an element into CouchbaseQueue with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
queuePushin interfaceBucket- Parameters:
docId- document id backing the queueelement- element to be pushed into the queuemutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- true if successful
-
queuePush
public <E> boolean queuePush(String docId, E element, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketAdd an element into CouchbaseQueue with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
queuePushin interfaceBucket- Parameters:
docId- document id backing the queueelement- element to be pushed into the queuemutationOptionBuilder- mutation optionsMutationOptionBuildertimeout- the custom timeouttimeUnit- the unit for the timeout- Returns:
- true if successful
-
queuePop
public <E> E queuePop(String docId, Class<E> elementType)
Description copied from interface:BucketRemoves the first element from CouchbaseQueue This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
queuePop
public <E> E queuePop(String docId, Class<E> elementType, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves the first element from CouchbaseQueue This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
queuePop
public <E> E queuePop(String docId, Class<E> elementType, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:BucketRemoves the first element from CouchbaseQueue with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
queuePop
public <E> E queuePop(String docId, Class<E> elementType, MutationOptionBuilder mutationOptionBuilder, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketRemoves the first element from CouchbaseQueue with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The durability constraint could not be fulfilled because of a temporary or persistent problem:DurabilityException. - A CAS value was set and it did not match with the server:CASMismatchException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
queueSize
public int queueSize(String docId)
Description copied from interface:BucketReturns the number of elements in CouchbaseQueue This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
queueSize
public int queueSize(String docId, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketReturns the number of elements in CouchbaseQueue This method throws under the following conditions: - The producer outpaces the SDK:BackpressureException- The operation had to be cancelled while on the wire or the retry strategy cancelled it instead of retrying:RequestCancelledException- If the underlying couchbase document does not exist:DocumentDoesNotExistException- The server is currently not able to process the request, retrying may help:TemporaryFailureException- The server is out of memory:CouchbaseOutOfMemoryException- Unexpected errors are caught and contained in a genericCouchbaseException.
-
close
public Boolean close()
Description copied from interface:BucketCloses this bucket with the default disconnect timeout.
-
close
public Boolean close(long timeout, TimeUnit timeUnit)
Description copied from interface:BucketCloses this bucket with a custom timeout.
-
isClosed
public boolean isClosed()
Description copied from interface:BucketReturns true if this bucket is already closed, false if it is still open.
-
invalidateQueryCache
public int invalidateQueryCache()
Description copied from interface:BucketInvalidates and clears the internal query cache. This method can be used to explicitly clear the internal N1QL query cache. This cache will be filled with non-adhoc query statements (query plans) to speed up those subsequent executions. Triggering this method will wipe out the complete cache, which will not cause an interruption but rather all queries need to be re-prepared internally. This method is likely to be deprecated in the future once the server side query engine distributes its state throughout the cluster. This method will not throw under any conditions.- Specified by:
invalidateQueryCachein interfaceBucket- Returns:
- the number of entries in the cache before it was cleared out.
-
ping
public PingReport ping(String reportId, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketPerforms a diagnostic active "ping" call with a custom report ID on all services. Note that since each service has different timeouts, you need to provide a timeout that suits your needs (how long each individual service ping should take max before it times out).
-
ping
public PingReport ping(long timeout, TimeUnit timeUnit)
Description copied from interface:BucketPerforms a diagnostic active "ping" call on all services with a random report id. Note that since each service has different timeouts, you need to provide a timeout that suits your needs (how long each individual service ping should take max before it times out).
-
ping
public PingReport ping(Collection<ServiceType> services, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketPerforms a diagnostic active "ping" call on a list of services with a random report id. Note that since each service has different timeouts, you need to provide a timeout that suits your needs (how long each individual service ping should take max before it times out).
-
ping
public PingReport ping(String reportId, Collection<ServiceType> services, long timeout, TimeUnit timeUnit)
Description copied from interface:BucketPerforms a diagnostic active "ping" call against all the services provided with a custom report id. Note that since each service has different timeouts, you need to provide a timeout that suits your needs (how long each individual service ping should take max before it times out).
-
exportAnalyticsDeferredResultHandle
public byte[] exportAnalyticsDeferredResultHandle(AnalyticsDeferredResultHandle handle)
Description copied from interface:BucketExports the deferred result handle to a serialized form which can be used across SDKs- Specified by:
exportAnalyticsDeferredResultHandlein interfaceBucket- Parameters:
handle- the deferred result handle- Returns:
- the serialized bytes
-
importAnalyticsDeferredResultHandle
public AnalyticsDeferredResultHandle importAnalyticsDeferredResultHandle(byte[] b)
Description copied from interface:BucketImports from json to create aAnalyticsDeferredResultHandle.- Specified by:
importAnalyticsDeferredResultHandlein interfaceBucket- Parameters:
b- the bytes to be converted to handle- Returns:
- the deferred handle instance
-
ping
public PingReport ping(String reportId)
Description copied from interface:BucketPerforms a diagnostic active "ping" call with a custom report ID on all services. Since no timeout is provided, the management timeout from the environment will be used.
-
ping
public PingReport ping()
Description copied from interface:BucketPerforms a diagnostic active "ping" call with a random report id on all services. Since no timeout is provided, the management timeout from the environment will be used.
-
ping
public PingReport ping(Collection<ServiceType> services)
Description copied from interface:BucketPerforms a diagnostic active "ping" call with a random report id on all services. Since no timeout is provided, the management timeout from the environment will be used.
-
ping
public PingReport ping(String reportId, Collection<ServiceType> services)
Description copied from interface:BucketPerforms a diagnostic active "ping" call with a custom report id on all services. Since no timeout is provided, the management timeout from the environment will be used.
-
-