Package com.couchbase.client.java
Class CouchbaseAsyncBucket
- java.lang.Object
-
- com.couchbase.client.java.CouchbaseAsyncBucket
-
- All Implemented Interfaces:
AsyncBucket
public class CouchbaseAsyncBucket extends Object implements AsyncBucket
-
-
Field Summary
Fields Modifier and Type Field Description static BinaryTranscoderBINARY_TRANSCODERstatic ByteArrayTranscoderBYTE_ARRAY_TRANSCODERstatic intCOUNTER_NOT_EXISTS_EXPIRYstatic StringCURRENT_BUCKET_IDENTIFIERstatic JsonArrayTranscoderJSON_ARRAY_TRANSCODERstatic JsonBooleanTranscoderJSON_BOOLEAN_TRANSCODERstatic JsonDoubleTranscoderJSON_DOUBLE_TRANSCODERstatic JsonLongTranscoderJSON_LONG_TRANSCODERstatic JsonTranscoderJSON_OBJECT_TRANSCODERstatic JsonStringTranscoderJSON_STRING_TRANSCODERstatic LegacyTranscoderLEGACY_TRANSCODERstatic RawJsonTranscoderRAW_JSON_TRANSCODERstatic SerializableTranscoderSERIALIZABLE_TRANSCODERstatic StringTranscoderSTRING_TRANSCODER
-
Constructor Summary
Constructors Constructor Description CouchbaseAsyncBucket(ClusterFacade core, CouchbaseEnvironment environment, String name, String username, String password, List<Transcoder<? extends Document,?>> customTranscoders)CouchbaseAsyncBucket(ClusterFacade core, CouchbaseEnvironment environment, String name, String password, List<Transcoder<? extends Document,?>> customTranscoders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <D extends Document<?>>
rx.Observable<D>append(D document)Append aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>append(D document, long timeout, TimeUnit timeUnit)Append aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>append(D document, PersistTo persistTo)Append aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>append(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)Append aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>append(D document, PersistTo persistTo, ReplicateTo replicateTo)Append aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>append(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Append aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>append(D document, ReplicateTo replicateTo)Append aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>append(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Append aDocuments content to an existing one.rx.Observable<AsyncBucketManager>bucketManager()Provides access to theAsyncBucketManagerfor administrative access.rx.Observable<Boolean>close()Closes theAsyncBucket.rx.Observable<ClusterFacade>core()Returns the underlying "core-io" library through itsClusterFacade.rx.Observable<JsonLongDocument>counter(String id, long delta)Increment or decrement a counter with the given value or throw an exception if it does not exist yet.rx.Observable<JsonLongDocument>counter(String id, long delta, long initial)Increment or decrement a counter with the given value and a initial value if it does not exist.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.rx.Observable<JsonLongDocument>counter(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.CouchbaseEnvironmentenvironment()TheCouchbaseEnvironmentused.<D extends Document<?>>
rx.Observable<Boolean>exists(D document)Check whether a document with the given ID does exist in the bucket.<D extends Document<?>>
rx.Observable<Boolean>exists(D document, long timeout, TimeUnit timeUnit)Check whether a document with the given ID does exist in the bucket with a custom timeout.rx.Observable<Boolean>exists(String id)Check whether a document with the given ID does exist in the bucket.rx.Observable<Boolean>exists(String id, long timeout, TimeUnit timeUnit)Check whether a document with the given ID does exist in the bucket with a custom timeout.<D extends Document<?>>
rx.Observable<D>get(D document)Retrieves any type ofDocumentby its unique ID.<D extends Document<?>>
rx.Observable<D>get(D document, long timeout, TimeUnit timeUnit)Retrieves any type ofDocumentby its unique ID with a custom timeout.rx.Observable<JsonDocument>get(String id)Retrieves aJsonDocumentby its unique ID.rx.Observable<JsonDocument>get(String id, long timeout, TimeUnit timeUnit)Retrieves aJsonDocumentby its unique ID with a custom timeout.<D extends Document<?>>
rx.Observable<D>get(String id, Class<D> target)Retrieves any type ofDocumentby its unique ID.<D extends Document<?>>
rx.Observable<D>get(String id, Class<D> target, long timeout, TimeUnit timeUnit)Retrieves any type ofDocumentby its unique ID with a custom timeout.<D extends Document<?>>
rx.Observable<D>getAndLock(D document, int lockTime)Retrieve and lock aDocumentby its unique ID.<D extends Document<?>>
rx.Observable<D>getAndLock(D document, int lockTime, long timeout, TimeUnit timeUnit)Retrieve and lock aDocumentby its unique ID with a custom timeout.rx.Observable<JsonDocument>getAndLock(String id, int lockTime)Retrieve and lock aJsonDocumentby its unique ID.rx.Observable<JsonDocument>getAndLock(String id, int lockTime, long timeout, TimeUnit timeUnit)Retrieve and lock aJsonDocumentby its unique ID with a custom timeout.<D extends Document<?>>
rx.Observable<D>getAndLock(String id, int lockTime, Class<D> target)Retrieve and lock aDocumentby its unique ID.<D extends Document<?>>
rx.Observable<D>getAndLock(String id, int lockTime, Class<D> target, long timeout, TimeUnit timeUnit)Retrieve and lock aDocumentby its unique ID with a custom timeout.<D extends Document<?>>
rx.Observable<D>getAndTouch(D document)Retrieve and touch aDocumentby its unique ID.<D extends Document<?>>
rx.Observable<D>getAndTouch(D document, long timeout, TimeUnit timeUnit)Retrieve and touch aDocumentby its unique ID with a custom timeout.rx.Observable<JsonDocument>getAndTouch(String id, int expiry)Retrieve and touch aJsonDocumentby its unique ID.rx.Observable<JsonDocument>getAndTouch(String id, int expiry, long timeout, TimeUnit timeUnit)Retrieve and touch aJsonDocumentby its unique ID with a custom timeout.<D extends Document<?>>
rx.Observable<D>getAndTouch(String id, int expiry, Class<D> target)Retrieve and touch aDocumentby its unique ID.<D extends Document<?>>
rx.Observable<D>getAndTouch(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<?>>
rx.Observable<D>getFromReplica(D document, ReplicaMode type)Retrieves one or more, possibly stale, representations of aDocumentby its unique ID.<D extends Document<?>>
rx.Observable<D>getFromReplica(D document, ReplicaMode type, long timeout, TimeUnit timeUnit)Retrieves one or more, possibly stale, representations of aDocumentby its unique ID.rx.Observable<JsonDocument>getFromReplica(String id, ReplicaMode type)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID.rx.Observable<JsonDocument>getFromReplica(String id, ReplicaMode type, long timeout, TimeUnit timeUnit)Retrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID.<D extends Document<?>>
rx.Observable<D>getFromReplica(String id, ReplicaMode type, Class<D> target)Retrieves one or more, possibly stale, representations of aDocumentby its unique ID.<D extends Document<?>>
rx.Observable<D>getFromReplica(String id, ReplicaMode type, Class<D> target, long timeout, TimeUnit timeUnit)Retrieves one or more, possibly stale, representations of aDocumentby its unique ID.<D extends Document<?>>
rx.Observable<D>insert(D document)Insert aDocumentif it does not exist already.<D extends Document<?>>
rx.Observable<D>insert(D document, long timeout, TimeUnit timeUnit)Insert aDocumentif it does not exist already.<D extends Document<?>>
rx.Observable<D>insert(D document, PersistTo persistTo)Insert aDocumentif it does not exist already and watch for durability constraints.<D extends Document<?>>
rx.Observable<D>insert(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)Insert aDocumentif it does not exist already and watch for durability constraints.<D extends Document<?>>
rx.Observable<D>insert(D document, PersistTo persistTo, ReplicateTo replicateTo)Insert aDocumentif it does not exist already and watch for durability constraints.<D extends Document<?>>
rx.Observable<D>insert(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Insert aDocumentif it does not exist already and watch for durability constraints.<D extends Document<?>>
rx.Observable<D>insert(D document, ReplicateTo replicateTo)Insert aDocumentif it does not exist already and watch for durability constraints.<D extends Document<?>>
rx.Observable<D>insert(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Insert aDocumentif it does not exist already and watch for durability constraints.rx.Observable<Integer>invalidateQueryCache()Invalidates and clears the internal query cache.booleanisClosed()Returns true if this bucket is already closed, false if it is still open.<E> rx.Observable<Boolean>listAppend(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- 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> rx.Observable<Boolean>listAppend(String docId, E element, MutationOptionBuilder mutationOptionBuilder)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- 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> rx.Observable<E>listGet(String docId, int index, Class<E> elementType)Get element at an index in the 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 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> rx.Observable<Boolean>listPrepend(String docId, E element)Shift list head to element in CouchbaseList This method throws under the following conditions: -IllegalStateExceptionif the list is full (limited by couchbase document size) - 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> rx.Observable<Boolean>listPrepend(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.rx.Observable<Boolean>listRemove(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.rx.Observable<Boolean>listRemove(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.<E> rx.Observable<Boolean>listSet(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- 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> rx.Observable<Boolean>listSet(String docId, int index, E element, MutationOptionBuilder mutationOptionBuilder)Add an element at an index in CouchbaseList with additional mutation options provided byMutationOptionBuilder.rx.Observable<Integer>listSize(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.AsyncLookupInBuilderlookupIn(String docId)Prepare a sub-document lookup through abuilder API.<V> rx.Observable<Boolean>mapAdd(String docId, String key, V value)Add a key value pair into 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.<V> rx.Observable<Boolean>mapAdd(String docId, String key, V value, MutationOptionBuilder mutationOptionBuilder)Add a key value pair into CouchbaseMap with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: -IllegalStateExceptionif the map is full (limited by couchbase document size) - 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.<V> rx.Observable<V>mapGet(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.rx.Observable<Boolean>mapRemove(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.rx.Observable<Boolean>mapRemove(String docId, String key, MutationOptionBuilder mutationOptionBuilder)Remove a key value pair from CouchbaseMap 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.rx.Observable<Integer>mapSize(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.AsyncMutateInBuildermutateIn(String docId)Prepare a sub-document mutation through abuilder API.protected N1qlQueryExecutorn1qlQueryExecutor()Returns the underlyingN1qlQueryExecutorused to perform N1QL queries.Stringname()The name of theBucket.rx.Single<PingReport>ping(long timeout, TimeUnit timeUnit)Performs a diagnostic active "ping" call on all services with a random service id.rx.Single<PingReport>ping(String reportId, long timeout, TimeUnit timeUnit)Performs a diagnostic active "ping" call with a custom report ID on all services.rx.Single<PingReport>ping(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.rx.Single<PingReport>ping(Collection<ServiceType> services, long timeout, TimeUnit timeUnit)Performs a diagnostic active "ping" call on a list of services with a random service id.<D extends Document<?>>
rx.Observable<D>prepend(D document)Prepend aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>prepend(D document, long timeout, TimeUnit timeUnit)Prepend aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>prepend(D document, PersistTo persistTo)Prepend aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>prepend(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)Prepend aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>prepend(D document, PersistTo persistTo, ReplicateTo replicateTo)Prepend aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>prepend(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Prepend aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>prepend(D document, ReplicateTo replicateTo)Prepend aDocuments content to an existing one.<D extends Document<?>>
rx.Observable<D>prepend(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Prepend aDocuments content to an existing one.rx.Observable<AsyncAnalyticsQueryResult>query(AnalyticsQuery query)Queries Couchbase Analyticsrx.Observable<AsyncAnalyticsQueryResult>query(AnalyticsQuery query, long timeout, TimeUnit timeUnit)Queries Couchbase Analyticsrx.Observable<AsyncN1qlQueryResult>query(N1qlQuery query)Queries a N1QL secondary index.rx.Observable<AsyncN1qlQueryResult>query(N1qlQuery query, long timeout, TimeUnit timeUnit)Queries a N1QL secondary index with a custom timeout.rx.Observable<AsyncN1qlQueryResult>query(Statement statement)Queries a N1QL secondary index with a simpleStatement.rx.Observable<AsyncSearchQueryResult>query(SearchQuery query)Queries a Full-Text Index The returnedObservablecan error 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:RequestCancelledExceptionrx.Observable<AsyncSearchQueryResult>query(SearchQuery query, long timeout, TimeUnit timeUnit)Queries a Full-Text Index The returnedObservablecan error 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:RequestCancelledExceptionrx.Observable<AsyncSpatialViewResult>query(SpatialViewQuery query)Queries a Couchbase Server SpatialView.rx.Observable<AsyncSpatialViewResult>query(SpatialViewQuery query, long timeout, TimeUnit timeUnit)Queries a Couchbase Server SpatialView.rx.Observable<AsyncViewResult>query(ViewQuery query)Queries a Couchbase ServerView.rx.Observable<AsyncViewResult>query(ViewQuery query, long timeout, TimeUnit timeUnit)Queries a Couchbase ServerView.<E> rx.Observable<E>queuePop(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> rx.Observable<E>queuePop(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> rx.Observable<Boolean>queuePush(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> rx.Observable<Boolean>queuePush(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.rx.Observable<Integer>queueSize(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.<D extends Document<?>>
rx.Observable<D>remove(D document)Removes aDocumentfrom the Server.<D extends Document<?>>
rx.Observable<D>remove(D document, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server.<D extends Document<?>>
rx.Observable<D>remove(D document, PersistTo persistTo)Removes aDocumentfrom the Server and apply a durability requirement.<D extends Document<?>>
rx.Observable<D>remove(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server and apply a durability requirement.<D extends Document<?>>
rx.Observable<D>remove(D document, PersistTo persistTo, ReplicateTo replicateTo)Removes aDocumentfrom the Server and apply a durability requirement.<D extends Document<?>>
rx.Observable<D>remove(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server and apply a durability requirement.<D extends Document<?>>
rx.Observable<D>remove(D document, ReplicateTo replicateTo)Removes aDocumentfrom the Server and apply a durability requirement.<D extends Document<?>>
rx.Observable<D>remove(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server and apply a durability requirement.rx.Observable<JsonDocument>remove(String id)Removes aDocumentfrom the Server identified by its ID.rx.Observable<JsonDocument>remove(String id, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server identified by its ID.rx.Observable<JsonDocument>remove(String id, PersistTo persistTo)Removes aDocumentfrom the Server by its ID and apply a durability requirement.rx.Observable<JsonDocument>remove(String id, PersistTo persistTo, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server by its ID and apply a durability requirement.rx.Observable<JsonDocument>remove(String id, PersistTo persistTo, ReplicateTo replicateTo)Removes aDocumentfrom the Server by its ID and apply a durability requirement.rx.Observable<JsonDocument>remove(String id, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server by its ID and apply a durability requirement.<D extends Document<?>>
rx.Observable<D>remove(String id, PersistTo persistTo, ReplicateTo replicateTo, Class<D> target)Removes aDocumentfrom the Server by its ID and apply a durability requirement.<D extends Document<?>>
rx.Observable<D>remove(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.<D extends Document<?>>
rx.Observable<D>remove(String id, PersistTo persistTo, Class<D> target)Removes aDocumentfrom the Server by its ID and apply a durability requirement.<D extends Document<?>>
rx.Observable<D>remove(String id, PersistTo persistTo, Class<D> target, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server by its ID and apply a durability requirement.rx.Observable<JsonDocument>remove(String id, ReplicateTo replicateTo)Removes aDocumentfrom the Server by its ID and apply a durability requirement.rx.Observable<JsonDocument>remove(String id, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server by its ID and apply a durability requirement.<D extends Document<?>>
rx.Observable<D>remove(String id, ReplicateTo replicateTo, Class<D> target)Removes aDocumentfrom the Server by its ID and apply a durability requirement.<D extends Document<?>>
rx.Observable<D>remove(String id, ReplicateTo replicateTo, Class<D> target, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server by its ID and apply a durability requirement.<D extends Document<?>>
rx.Observable<D>remove(String id, Class<D> target)Removes aDocumentfrom the Server identified by its ID.<D extends Document<?>>
rx.Observable<D>remove(String id, Class<D> target, long timeout, TimeUnit timeUnit)Removes aDocumentfrom the Server identified by its ID.<D extends Document<?>>
rx.Observable<D>replace(D document)Replace aDocumentif it does already exist.<D extends Document<?>>
rx.Observable<D>replace(D document, long timeout, TimeUnit timeUnit)Replace aDocumentif it does already exist.<D extends Document<?>>
rx.Observable<D>replace(D document, PersistTo persistTo)Replace aDocumentif it does exist and watch for durability constraints.<D extends Document<?>>
rx.Observable<D>replace(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)Replace aDocumentif it does exist and watch for durability constraints.<D extends Document<?>>
rx.Observable<D>replace(D document, PersistTo persistTo, ReplicateTo replicateTo)Replace aDocumentif it does exist and watch for durability constraints.<D extends Document<?>>
rx.Observable<D>replace(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Replace aDocumentif it does exist and watch for durability constraints.<D extends Document<?>>
rx.Observable<D>replace(D document, ReplicateTo replicateTo)Replace aDocumentif it does exist and watch for durability constraints.<D extends Document<?>>
rx.Observable<D>replace(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Replace aDocumentif it does exist and watch for durability constraints.rx.Observable<AsyncRepository>repository()TheRepositoryprovides access to full object document mapping (ODM) capabilities.<E> rx.Observable<Boolean>setAdd(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> rx.Observable<Boolean>setAdd(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> rx.Observable<Boolean>setContains(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> rx.Observable<E>setRemove(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> rx.Observable<E>setRemove(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.rx.Observable<Integer>setSize(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.FragmentTranscodersubdocumentTranscoder()Returns the transcoder to be used for individual JSON fragments used and returned by the subdocument API.StringtoString()<D extends Document<?>>
rx.Observable<Boolean>touch(D document)Renews the expiration time of aDocument.<D extends Document<?>>
rx.Observable<Boolean>touch(D document, long timeout, TimeUnit timeUnit)Renews the expiration time of aDocument.rx.Observable<Boolean>touch(String id, int expiry)Renews the expiration time of aDocument.rx.Observable<Boolean>touch(String id, int expiry, long timeout, TimeUnit timeUnit)Renews the expiration time of aDocument.<D extends Document<?>>
rx.Observable<Boolean>unlock(D document)Unlocks a write-lockedDocument.<D extends Document<?>>
rx.Observable<Boolean>unlock(D document, long timeout, TimeUnit timeUnit)Unlocks a write-lockedDocument.rx.Observable<Boolean>unlock(String id, long cas)Unlocks a write-lockedDocument.rx.Observable<Boolean>unlock(String id, long cas, long timeout, TimeUnit timeUnit)Unlocks a write-lockedDocument.<D extends Document<?>>
rx.Observable<D>upsert(D document)Insert or overwrite aDocument.<D extends Document<?>>
rx.Observable<D>upsert(D document, long timeout, TimeUnit timeUnit)Insert or overwrite aDocument.<D extends Document<?>>
rx.Observable<D>upsert(D document, PersistTo persistTo)Insert or overwrite aDocumentand watch for durability constraints.<D extends Document<?>>
rx.Observable<D>upsert(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)Insert or overwrite aDocumentand watch for durability constraints.<D extends Document<?>>
rx.Observable<D>upsert(D document, PersistTo persistTo, ReplicateTo replicateTo)Insert or overwrite aDocumentand watch for durability constraints.<D extends Document<?>>
rx.Observable<D>upsert(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Insert or overwrite aDocumentand watch for durability constraints.<D extends Document<?>>
rx.Observable<D>upsert(D document, ReplicateTo replicateTo)Insert or overwrite aDocumentand watch for durability constraints.<D extends Document<?>>
rx.Observable<D>upsert(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)Insert or overwrite aDocumentand watch for durability constraints.
-
-
-
Field Detail
-
COUNTER_NOT_EXISTS_EXPIRY
public static final int COUNTER_NOT_EXISTS_EXPIRY
- See Also:
- Constant Field Values
-
CURRENT_BUCKET_IDENTIFIER
public static final String CURRENT_BUCKET_IDENTIFIER
- See Also:
- Constant Field Values
-
JSON_OBJECT_TRANSCODER
public static final JsonTranscoder JSON_OBJECT_TRANSCODER
-
JSON_ARRAY_TRANSCODER
public static final JsonArrayTranscoder JSON_ARRAY_TRANSCODER
-
JSON_BOOLEAN_TRANSCODER
public static final JsonBooleanTranscoder JSON_BOOLEAN_TRANSCODER
-
JSON_DOUBLE_TRANSCODER
public static final JsonDoubleTranscoder JSON_DOUBLE_TRANSCODER
-
JSON_LONG_TRANSCODER
public static final JsonLongTranscoder JSON_LONG_TRANSCODER
-
JSON_STRING_TRANSCODER
public static final JsonStringTranscoder JSON_STRING_TRANSCODER
-
RAW_JSON_TRANSCODER
public static final RawJsonTranscoder RAW_JSON_TRANSCODER
-
BYTE_ARRAY_TRANSCODER
public static final ByteArrayTranscoder BYTE_ARRAY_TRANSCODER
-
LEGACY_TRANSCODER
public static final LegacyTranscoder LEGACY_TRANSCODER
-
BINARY_TRANSCODER
public static final BinaryTranscoder BINARY_TRANSCODER
-
STRING_TRANSCODER
public static final StringTranscoder STRING_TRANSCODER
-
SERIALIZABLE_TRANSCODER
public static final SerializableTranscoder SERIALIZABLE_TRANSCODER
-
-
Constructor Detail
-
CouchbaseAsyncBucket
public CouchbaseAsyncBucket(ClusterFacade core, CouchbaseEnvironment environment, String name, String password, List<Transcoder<? extends Document,?>> customTranscoders)
-
CouchbaseAsyncBucket
public CouchbaseAsyncBucket(ClusterFacade core, CouchbaseEnvironment environment, String name, String username, String password, List<Transcoder<? extends Document,?>> customTranscoders)
-
-
Method Detail
-
name
public String name()
Description copied from interface:AsyncBucketThe name of theBucket.- Specified by:
namein interfaceAsyncBucket- Returns:
- the name of the bucket.
-
core
public rx.Observable<ClusterFacade> core()
Description copied from interface:AsyncBucketReturns 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 interfaceAsyncBucket- Returns:
- the underlying
ClusterFacadefrom the "core-io" package.
-
subdocumentTranscoder
public FragmentTranscoder subdocumentTranscoder()
Description copied from interface:AsyncBucketReturns the transcoder to be used for individual JSON fragments used and returned by the subdocument API.- Specified by:
subdocumentTranscoderin interfaceAsyncBucket- Returns:
- the
FragmentTranscoderto be used within the subdocument API. - See Also:
AsyncBucket.lookupIn(String),AsyncBucket.mutateIn(String)
-
n1qlQueryExecutor
protected N1qlQueryExecutor n1qlQueryExecutor()
Returns the underlyingN1qlQueryExecutorused to perform N1QL queries. Handle with care since all additional checks that are normally performed by this library may be skipped (hence the protected visibility).
-
environment
public CouchbaseEnvironment environment()
Description copied from interface:AsyncBucketTheCouchbaseEnvironmentused.- Specified by:
environmentin interfaceAsyncBucket- Returns:
- the CouchbaseEnvironment.
-
repository
public rx.Observable<AsyncRepository> repository()
Description copied from interface:AsyncBucketTheRepositoryprovides 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 interfaceAsyncBucket- Returns:
- the repository for ODM capabilities.
-
get
public rx.Observable<JsonDocument> get(String id)
Description copied from interface:AsyncBucketRetrieves aJsonDocumentby its unique ID. If the document is found, aJsonDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. The returnedObservablecan error 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.- Specified by:
getin interfaceAsyncBucket- Parameters:
id- the unique ID of the document.- Returns:
- an
Observableeventually containing the foundJsonDocument.
-
get
public <D extends Document<?>> rx.Observable<D> get(D document)
Description copied from interface:AsyncBucketRetrieves any type ofDocumentby its unique ID. 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. The returnedObservablecan error 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.- Specified by:
getin interfaceAsyncBucket- Parameters:
document- the source document from which the ID is taken and the type is inferred.- Returns:
- an
Observableeventually containing the foundDocument.
-
get
public <D extends Document<?>> rx.Observable<D> get(String id, Class<D> target)
Description copied from interface:AsyncBucketRetrieves any type ofDocumentby its unique ID. This method differs fromAsyncBucket.get(String)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. The returnedObservablecan error 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.- Specified by:
getin interfaceAsyncBucket- Parameters:
id- the unique ID of the document.target- the target document type to use.- Returns:
- an
Observableeventually containing the foundDocument.
-
get
public <D extends Document<?>> rx.Observable<D> get(String id, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRetrieves any type ofDocumentby its unique ID with a custom timeout. This method differs fromAsyncBucket.get(String)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. The returnedObservablecan error 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.- Specified by:
getin interfaceAsyncBucket- 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:
- an
Observableeventually containing the foundDocument.
-
get
public rx.Observable<JsonDocument> get(String id, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRetrieves 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. The returnedObservablecan error 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.- Specified by:
getin interfaceAsyncBucket- Parameters:
id- the unique ID of the document.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing the foundJsonDocument.
-
get
public <D extends Document<?>> rx.Observable<D> get(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRetrieves any type ofDocumentby its unique 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. The returnedObservablecan error 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.- Specified by:
getin interfaceAsyncBucket- Parameters:
document- the source document from which the ID is taken and the type is inferred.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing the foundDocument.
-
exists
public rx.Observable<Boolean> exists(String id, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketCheck whether a document with the given ID does exist in the bucket with a custom timeout. The returnedObservablecan error 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.- Specified by:
existsin interfaceAsyncBucket- Parameters:
id- the id of the document.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- true if it exists, false otherwise.
-
exists
public <D extends Document<?>> rx.Observable<Boolean> exists(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketCheck whether a document with the given ID does exist in the bucket with a custom timeout. The returnedObservablecan error 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.- Specified by:
existsin interfaceAsyncBucket- Parameters:
document- the document where the ID is extracted from.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- true if it exists, false otherwise.
-
exists
public rx.Observable<Boolean> exists(String id)
Description copied from interface:AsyncBucketCheck whether a document with the given ID does exist in the bucket. The returnedObservablecan error 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.- Specified by:
existsin interfaceAsyncBucket- Parameters:
id- the id of the document.- Returns:
- true if it exists, false otherwise.
-
exists
public <D extends Document<?>> rx.Observable<Boolean> exists(D document)
Description copied from interface:AsyncBucketCheck whether a document with the given ID does exist in the bucket. The returnedObservablecan error 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.- Specified by:
existsin interfaceAsyncBucket- Parameters:
document- the document where the ID is extracted from.- Returns:
- true if it exists, false otherwise.
-
getAndLock
public rx.Observable<JsonDocument> getAndLock(String id, int lockTime)
Description copied from interface:AsyncBucketRetrieve and lock aJsonDocumentby its unique ID. If the document is found, aJsonDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toAsyncBucket.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. The returnedObservablecan error under the following conditions: - In case of transient error, most probably because key is already locked:TemporaryLockFailureException- 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:
getAndLockin interfaceAsyncBucket- Parameters:
id- id the unique ID of the document.lockTime- the time to write lock the document (max. 30 seconds).- Returns:
- an
Observableeventually containing the foundJsonDocument.
-
getAndLock
public <D extends Document<?>> rx.Observable<D> getAndLock(D document, int lockTime)
Description copied from interface:AsyncBucketRetrieve and lock aDocumentby its unique ID. If the document is found, aDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toAsyncBucket.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. The returnedObservablecan error under the following conditions: - In case of transient error, most probably because key is already locked:TemporaryLockFailureException- 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:
getAndLockin interfaceAsyncBucket- 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:
- an
Observableeventually containing the foundDocument.
-
getAndLock
public <D extends Document<?>> rx.Observable<D> getAndLock(String id, int lockTime, Class<D> target)
Description copied from interface:AsyncBucketRetrieve and lock aDocumentby its unique ID. This method differs fromAsyncBucket.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 toAsyncBucket.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. The returnedObservablecan error under the following conditions: - In case of transient error, most probably because key is already locked:TemporaryLockFailureException- 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:
getAndLockin interfaceAsyncBucket- 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:
- an
Observableeventually containing the foundDocument.
-
getAndTouch
public rx.Observable<JsonDocument> getAndTouch(String id, int expiry)
Description copied from interface:AsyncBucketRetrieve and touch aJsonDocumentby its unique ID. If the document is found, aJsonDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toAsyncBucket.get(String), but in addition it touches the document, which will reset its configured expiration time to the value provided. The returnedObservablecan error 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.- Specified by:
getAndTouchin interfaceAsyncBucket- Parameters:
id- id the unique ID of the document.expiry- the new expiration time for the document.- Returns:
- an
Observableeventually containing the foundJsonDocument.
-
getAndTouch
public <D extends Document<?>> rx.Observable<D> getAndTouch(D document)
Description copied from interface:AsyncBucketRetrieve and touch aDocumentby its unique ID. If the document is found, aDocumentis returned. If the document is not found, theObservablecompletes without an item emitted. This method works similar toAsyncBucket.get(Document), but in addition it touches the document, which will reset its configured expiration time set on the given document itself. The returnedObservablecan error 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.- Specified by:
getAndTouchin interfaceAsyncBucket- Parameters:
document- the source document from which the ID and expiry is taken and the type is inferred.- Returns:
- an
Observableeventually containing the foundDocument.
-
getAndTouch
public <D extends Document<?>> rx.Observable<D> getAndTouch(String id, int expiry, Class<D> target)
Description copied from interface:AsyncBucketRetrieve and touch aDocumentby its unique ID. This method differs fromAsyncBucket.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 toAsyncBucket.get(String, Class), but in addition it touches the document, which will reset its configured expiration time to the value provided. The returnedObservablecan error 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.- Specified by:
getAndTouchin interfaceAsyncBucket- 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:
- an
Observableeventually containing the foundDocument.
-
getFromReplica
public rx.Observable<JsonDocument> getFromReplica(String id, ReplicaMode type)
Description copied from interface:AsyncBucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID. 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, all errors are swallowed (but logged) and the Observable will return all successful responses.- Specified by:
getFromReplicain interfaceAsyncBucket- Parameters:
id- id the unique ID of the document.type- theReplicaModeto select.- Returns:
- an
Observableeventually containing zero to NJsonDocuments.
-
getFromReplica
public <D extends Document<?>> rx.Observable<D> getFromReplica(D document, ReplicaMode type)
Description copied from interface:AsyncBucketRetrieves one or more, possibly stale, representations of aDocumentby its unique ID. 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. Depending on theReplicaModeselected, there can be none to fourDocumentbe 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 returningDocumentresponses can come in any order. The returnedObservablecan error under the following conditions: Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, all errors are swallowed (but logged) and the Observable will return all successful responses.- Specified by:
getFromReplicain interfaceAsyncBucket- Parameters:
document- the source document from which the ID is taken and the type is inferred.type- theReplicaModeto select.- Returns:
- an
Observableeventually containing zero to NDocuments.
-
getFromReplica
public <D extends Document<?>> rx.Observable<D> getFromReplica(String id, ReplicaMode type, Class<D> target)
Description copied from interface:AsyncBucketRetrieves one or more, possibly stale, representations of aDocumentby its unique ID. This method differs fromAsyncBucket.getFromReplica(String, ReplicaMode)in that if a specificDocumenttype is passed in, the appropriateTranscoderwill be selected (and not JSON conversion). Depending on theReplicaModeselected, there can be none to fourDocumentbe 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 returningDocumentresponses can come in any order. The returnedObservablecan error under the following conditions: Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, all errors are swallowed (but logged) and the Observable will return all successful responses.- Specified by:
getFromReplicain interfaceAsyncBucket- Parameters:
id- id the unique ID of the document.type- theReplicaModeto select.target- the target document type to use.- Returns:
- an
Observableeventually containing zero to NDocuments.
-
getFromReplica
public rx.Observable<JsonDocument> getFromReplica(String id, ReplicaMode type, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRetrieves one or more, possibly stale, representations of aJsonDocumentby its unique ID. 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, all errors are swallowed (but logged) and the Observable will return all successful responses.- Specified by:
getFromReplicain interfaceAsyncBucket- Parameters:
id- id the unique ID of the document.type- theReplicaModeto select.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing zero to NJsonDocuments.
-
getFromReplica
public <D extends Document<?>> rx.Observable<D> getFromReplica(D document, ReplicaMode type, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRetrieves one or more, possibly stale, representations of aDocumentby its unique ID. 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. Depending on theReplicaModeselected, there can be none to fourDocumentbe 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 returningDocumentresponses can come in any order. The returnedObservablecan error under the following conditions: Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, all errors are swallowed (but logged) and the Observable will return all successful responses.- Specified by:
getFromReplicain interfaceAsyncBucket- Parameters:
document- the source document from which the ID is taken and the type is inferred.type- theReplicaModeto select.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing zero to NDocuments.
-
getFromReplica
public <D extends Document<?>> rx.Observable<D> getFromReplica(String id, ReplicaMode type, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRetrieves one or more, possibly stale, representations of aDocumentby its unique ID. This method differs fromAsyncBucket.getFromReplica(String, ReplicaMode)in that if a specificDocumenttype is passed in, the appropriateTranscoderwill be selected (and not JSON conversion). Depending on theReplicaModeselected, there can be none to fourDocumentbe 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 returningDocumentresponses can come in any order. The returnedObservablecan error under the following conditions: Because this method is considered to be a "last resort" call against the database if a regular get didn't succeed, all errors are swallowed (but logged) and the Observable will return all successful responses.- Specified by:
getFromReplicain interfaceAsyncBucket- Parameters:
id- id the unique 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:
- an
Observableeventually containing zero to NDocuments.
-
getAndLock
public rx.Observable<JsonDocument> getAndLock(String id, int lockTime, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRetrieve 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 toAsyncBucket.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. The returnedObservablecan error under the following conditions: - In case of transient error, most probably because key is already locked:TemporaryLockFailureException- 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:
getAndLockin interfaceAsyncBucket- 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:
- an
Observableeventually containing the foundJsonDocument.
-
getAndLock
public <D extends Document<?>> rx.Observable<D> getAndLock(D document, int lockTime, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRetrieve 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 toAsyncBucket.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. The returnedObservablecan error under the following conditions: - In case of transient error, most probably because key is already locked:TemporaryLockFailureException- 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:
getAndLockin interfaceAsyncBucket- 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:
- an
Observableeventually containing the foundDocument.
-
getAndLock
public <D extends Document<?>> rx.Observable<D> getAndLock(String id, int lockTime, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRetrieve and lock aDocumentby its unique ID with a custom timeout. This method differs fromAsyncBucket.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 toAsyncBucket.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. The returnedObservablecan error under the following conditions: - In case of transient error, most probably because key is already locked:TemporaryLockFailureException- 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:
getAndLockin interfaceAsyncBucket- 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:
- an
Observableeventually containing the foundDocument.
-
getAndTouch
public rx.Observable<JsonDocument> getAndTouch(String id, int expiry, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRetrieve and touch 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 toAsyncBucket.get(String), but in addition it touches the document, which will reset its configured expiration time to the value provided. The returnedObservablecan error 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.- Specified by:
getAndTouchin interfaceAsyncBucket- 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:
- an
Observableeventually containing the foundJsonDocument.
-
getAndTouch
public <D extends Document<?>> rx.Observable<D> getAndTouch(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRetrieve 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 toAsyncBucket.get(Document), but in addition it touches the document, which will reset its configured expiration time set on the given document itself. The returnedObservablecan error 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.- Specified by:
getAndTouchin interfaceAsyncBucket- 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:
- an
Observableeventually containing the foundDocument.
-
getAndTouch
public <D extends Document<?>> rx.Observable<D> getAndTouch(String id, int expiry, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRetrieve and touch aDocumentby its unique ID with a custom timeout. This method differs fromAsyncBucket.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 toAsyncBucket.get(String, Class), but in addition it touches the document, which will reset its configured expiration time to the value provided. The returnedObservablecan error 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.- Specified by:
getAndTouchin interfaceAsyncBucket- 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:
- an
Observableeventually containing the foundDocument.
-
insert
public <D extends Document<?>> rx.Observable<D> insert(D document)
Description copied from interface:AsyncBucketInsert aDocumentif it does not exist already. If the givenDocument(identified by its unique ID) already exists, the observable errors with aDocumentAlreadyExistsException. If the operation should also override the existingDocument,AsyncBucket.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,AsyncBucket.insert(Document, PersistTo, ReplicateTo)should be used instead. The returnedObservablecan error 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 original insert failed because the document is already stored:DocumentAlreadyExistsException- The request content is too big:RequestTooBigException- 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:
insertin interfaceAsyncBucket- Parameters:
document- theDocumentto insert.- Returns:
- an
Observableeventually containing a newDocument.
-
insert
public <D extends Document<?>> rx.Observable<D> insert(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketInsert aDocumentif it does not exist already and watch for durability constraints. This method works exactly likeAsyncBucket.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. The returnedObservablecan error 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 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.**- Specified by:
insertin interfaceAsyncBucket- Parameters:
document- theDocumentto insert.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing a newDocument.
-
upsert
public <D extends Document<?>> rx.Observable<D> upsert(D document)
Description copied from interface:AsyncBucketInsert or overwrite aDocument. 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, theAsyncBucket.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,AsyncBucket.upsert(Document, PersistTo, ReplicateTo)should be used instead. The returnedObservablecan error 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 request content is too big:RequestTooBigException- 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:
upsertin interfaceAsyncBucket- Parameters:
document- theDocumentto upsert.- Returns:
- an
Observableeventually containing a newDocument.
-
upsert
public <D extends Document<?>> rx.Observable<D> upsert(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketInsert or overwrite aDocumentand watch for durability constraints. This method works exactly likeAsyncBucket.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, theAsyncBucket.replace(Document, PersistTo, ReplicateTo)method needs to be used. The returnedObservablecan error 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 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.**- Specified by:
upsertin interfaceAsyncBucket- Parameters:
document- theDocumentto upsert.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing a newDocument.
-
replace
public <D extends Document<?>> rx.Observable<D> replace(D document)
Description copied from interface:AsyncBucketReplace aDocumentif it does already exist. If the givenDocument(identified by its unique ID) does not exist already, the method errors with aDocumentDoesNotExistException. If the operation should also insert theDocument,AsyncBucket.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,AsyncBucket.replace(Document, PersistTo, ReplicateTo)should be used instead. The returnedObservablecan error 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 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.- Specified by:
replacein interfaceAsyncBucket- Parameters:
document- theDocumentto replace.- Returns:
- an
Observableeventually containing a newDocument.
-
insert
public <D extends Document<?>> rx.Observable<D> insert(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketInsert aDocumentif it does not exist already. If the givenDocument(identified by its unique ID) already exists, the observable errors with aDocumentAlreadyExistsException. If the operation should also override the existingDocument,AsyncBucket.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,AsyncBucket.insert(Document, PersistTo, ReplicateTo)should be used instead. The returnedObservablecan error 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 original insert failed because the document is already stored:DocumentAlreadyExistsException- The request content is too big:RequestTooBigException- 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:
insertin interfaceAsyncBucket- Parameters:
document- theDocumentto insert.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing a newDocument.
-
insert
public <D extends Document<?>> rx.Observable<D> insert(D document, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketInsert aDocumentif it does not exist already and watch for durability constraints. This method works exactly likeAsyncBucket.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. The returnedObservablecan error 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 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.**- Specified by:
insertin interfaceAsyncBucket- Parameters:
document- theDocumentto insert.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.- Returns:
- an
Observableeventually containing a newDocument.
-
insert
public <D extends Document<?>> rx.Observable<D> insert(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketInsert aDocumentif it does not exist already and watch for durability constraints. This method works exactly likeAsyncBucket.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. The returnedObservablecan error 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 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.**- Specified by:
insertin interfaceAsyncBucket- Parameters:
document- theDocumentto insert.persistTo- the persistence constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing a newDocument.
-
insert
public <D extends Document<?>> rx.Observable<D> insert(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketInsert aDocumentif it does not exist already and watch for durability constraints. This method works exactly likeAsyncBucket.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. The returnedObservablecan error 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 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.**- Specified by:
insertin interfaceAsyncBucket- Parameters:
document- theDocumentto insert.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing a newDocument.
-
upsert
public <D extends Document<?>> rx.Observable<D> upsert(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketInsert or overwrite aDocument. 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, theAsyncBucket.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,AsyncBucket.upsert(Document, PersistTo, ReplicateTo)should be used instead. The returnedObservablecan error 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 request content is too big:RequestTooBigException- 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:
upsertin interfaceAsyncBucket- Parameters:
document- theDocumentto upsert.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing a newDocument.
-
upsert
public <D extends Document<?>> rx.Observable<D> upsert(D document, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketInsert or overwrite aDocumentand watch for durability constraints. This method works exactly likeAsyncBucket.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, theAsyncBucket.replace(Document, PersistTo, ReplicateTo)method needs to be used. The returnedObservablecan error 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 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.**- Specified by:
upsertin interfaceAsyncBucket- Parameters:
document- theDocumentto upsert.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.- Returns:
- an
Observableeventually containing a newDocument.
-
upsert
public <D extends Document<?>> rx.Observable<D> upsert(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketInsert or overwrite aDocumentand watch for durability constraints. This method works exactly likeAsyncBucket.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, theAsyncBucket.replace(Document, PersistTo)method needs to be used. The returnedObservablecan error 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 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.**- Specified by:
upsertin interfaceAsyncBucket- Parameters:
document- theDocumentto upsert.persistTo- the persistence constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing a newDocument.
-
upsert
public <D extends Document<?>> rx.Observable<D> upsert(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketInsert or overwrite aDocumentand watch for durability constraints. This method works exactly likeAsyncBucket.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, theAsyncBucket.replace(Document, ReplicateTo)method needs to be used. The returnedObservablecan error 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 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.**- Specified by:
upsertin interfaceAsyncBucket- Parameters:
document- theDocumentto upsert.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing a newDocument.
-
replace
public <D extends Document<?>> rx.Observable<D> replace(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketReplace aDocumentif it does already exist. If the givenDocument(identified by its unique ID) does not exist already, the method errors with aDocumentDoesNotExistException. If the operation should also insert theDocument,AsyncBucket.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,AsyncBucket.replace(Document, PersistTo, ReplicateTo)should be used instead. The returnedObservablecan error 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 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.- Specified by:
replacein interfaceAsyncBucket- Parameters:
document- theDocumentto replace.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing a newDocument.
-
replace
public <D extends Document<?>> rx.Observable<D> replace(D document, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketReplace aDocumentif it does exist and watch for durability constraints. This method works exactly likeAsyncBucket.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. The returnedObservablecan error 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 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.**- Specified by:
replacein interfaceAsyncBucket- Parameters:
document- theDocumentto replace.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.- Returns:
- an
Observableeventually containing a newDocument.
-
replace
public <D extends Document<?>> rx.Observable<D> replace(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketReplace aDocumentif it does exist and watch for durability constraints. This method works exactly likeAsyncBucket.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. The returnedObservablecan error 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 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.**- Specified by:
replacein interfaceAsyncBucket- Parameters:
document- theDocumentto replace.persistTo- the persistence constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing a newDocument.
-
replace
public <D extends Document<?>> rx.Observable<D> replace(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketReplace aDocumentif it does exist and watch for durability constraints. This method works exactly likeAsyncBucket.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. The returnedObservablecan error 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 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.**- Specified by:
replacein interfaceAsyncBucket- Parameters:
document- theDocumentto replace.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing a newDocument.
-
replace
public <D extends Document<?>> rx.Observable<D> replace(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketReplace aDocumentif it does exist and watch for durability constraints. This method works exactly likeAsyncBucket.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. The returnedObservablecan error 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 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.**- Specified by:
replacein interfaceAsyncBucket- Parameters:
document- theDocumentto replace.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- an
Observableeventually containing a newDocument.
-
remove
public <D extends Document<?>> rx.Observable<D> remove(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server. 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. The returnedObservablecan error 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 document to remove does not exist:DocumentDoesNotExistException- 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- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
removein interfaceAsyncBucket- Parameters:
document- the document to remove, with the ID extracted.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the document containing the ID.
-
remove
public rx.Observable<JsonDocument> remove(String id)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server identified by its ID. 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. The returnedObservablecan error 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 document to remove 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:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.- Returns:
- the document containing the ID.
-
remove
public <D extends Document<?>> rx.Observable<D> remove(String id, Class<D> target)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server identified by its ID. 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. The returnedObservablecan error 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 document to remove 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:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.target- the target document type to use.- Returns:
- the document containing the ID.
-
remove
public <D extends Document<?>> rx.Observable<D> remove(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server and apply a durability requirement. 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. The returnedObservablecan error 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. - The document to remove does not exist:DocumentDoesNotExistException- 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- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
removein interfaceAsyncBucket- 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 rx.Observable<JsonDocument> remove(String id, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement. 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. The returnedObservablecan error 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 document to remove does not exist:DocumentDoesNotExistException- 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.- Specified by:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.- Returns:
- the document containing the ID.
-
remove
public <D extends Document<?>> rx.Observable<D> remove(String id, PersistTo persistTo, ReplicateTo replicateTo, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement. 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. The returnedObservablecan error 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. - The document to remove 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:
removein interfaceAsyncBucket- 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<?>> rx.Observable<D> remove(D document)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server. 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. The returnedObservablecan error 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 document to remove does not exist:DocumentDoesNotExistException- 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- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
removein interfaceAsyncBucket- Parameters:
document- the document to remove, with the ID extracted.- Returns:
- the document containing the ID.
-
remove
public <D extends Document<?>> rx.Observable<D> remove(D document, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server and apply a durability requirement. 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. The returnedObservablecan error 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. - The document to remove does not exist:DocumentDoesNotExistException- 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- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
removein interfaceAsyncBucket- Parameters:
document- the document to remove, with the ID extracted.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.- Returns:
- the document containing the ID.
-
remove
public <D extends Document<?>> rx.Observable<D> remove(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server and apply a durability requirement. 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. The returnedObservablecan error 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. - The document to remove does not exist:DocumentDoesNotExistException- 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- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
removein interfaceAsyncBucket- Parameters:
document- the document to remove, with the ID extracted.persistTo- the persistence constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the document containing the ID.
-
remove
public <D extends Document<?>> rx.Observable<D> remove(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server and apply a durability requirement. 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. The returnedObservablecan error 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. - The document to remove does not exist:DocumentDoesNotExistException- 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- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
removein interfaceAsyncBucket- Parameters:
document- the document to remove, with the ID extracted.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the document containing the ID.
-
remove
public rx.Observable<JsonDocument> remove(String id, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server identified by its ID. 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. The returnedObservablecan error 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 document to remove 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:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the document containing the ID.
-
remove
public rx.Observable<JsonDocument> remove(String id, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement. 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. The returnedObservablecan error 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 document to remove does not exist:DocumentDoesNotExistException- 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.- Specified by:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.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 rx.Observable<JsonDocument> remove(String id, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement. 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. The returnedObservablecan error 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 document to remove does not exist:DocumentDoesNotExistException- 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.- Specified by:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.persistTo- the persistence constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- the document containing the ID.
-
remove
public rx.Observable<JsonDocument> remove(String id, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement. 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. The returnedObservablecan error 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 document to remove does not exist:DocumentDoesNotExistException- 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.- Specified by:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.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<?>> rx.Observable<D> remove(String id, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server identified by its ID. 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. The returnedObservablecan error 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 document to remove 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:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.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<?>> rx.Observable<D> remove(String id, PersistTo persistTo, ReplicateTo replicateTo, Class<D> target)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement. 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. The returnedObservablecan error 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. - The document to remove 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:
removein interfaceAsyncBucket- 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.- Returns:
- the document containing the ID.
-
remove
public <D extends Document<?>> rx.Observable<D> remove(String id, PersistTo persistTo, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement. 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. The returnedObservablecan error 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. - The document to remove 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:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.persistTo- the persistence 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<?>> rx.Observable<D> remove(String id, ReplicateTo replicateTo, Class<D> target, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement. 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. The returnedObservablecan error 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. - The document to remove 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:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.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.
-
query
public rx.Observable<AsyncViewResult> query(ViewQuery query)
Description copied from interface:AsyncBucketQueries a Couchbase ServerView. The returnedObservablecan error 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 design document or view is not found:ViewDoesNotExistException- Specified by:
queryin interfaceAsyncBucket- Parameters:
query- the query to perform.- Returns:
- a result containing all the found rows and additional information.
-
query
public rx.Observable<AsyncViewResult> query(ViewQuery query, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketQueries a Couchbase ServerView. The returnedObservablecan error 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 design document or view is not found:ViewDoesNotExistException- Specified by:
queryin interfaceAsyncBucket- Parameters:
query- the query to perform.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a result containing all the found rows and additional information.
-
query
public rx.Observable<AsyncSearchQueryResult> query(SearchQuery query)
Description copied from interface:AsyncBucketQueries a Full-Text Index The returnedObservablecan error 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- Specified by:
queryin interfaceAsyncBucket- Parameters:
query- the query builder.- Returns:
- a query result containing the matches and additional information.
-
query
public rx.Observable<AsyncSearchQueryResult> query(SearchQuery query, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketQueries a Full-Text Index The returnedObservablecan error 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- Specified by:
queryin interfaceAsyncBucket- Parameters:
query- the query builder.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a query result containing the matches and additional information.
-
query
public rx.Observable<AsyncSpatialViewResult> query(SpatialViewQuery query)
Description copied from interface:AsyncBucketQueries a Couchbase Server SpatialView. The returnedObservablecan error 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 design document or view is not found:ViewDoesNotExistException- Specified by:
queryin interfaceAsyncBucket- Parameters:
query- the spatial query to perform.- Returns:
- a result containing all the found rows and additional information.
-
query
public rx.Observable<AsyncSpatialViewResult> query(SpatialViewQuery query, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketQueries a Couchbase Server SpatialView. The returnedObservablecan error 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 design document or view is not found:ViewDoesNotExistException- Specified by:
queryin interfaceAsyncBucket- Parameters:
query- the spatial query to perform.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a result containing all the found rows and additional information.
-
query
public rx.Observable<AsyncN1qlQueryResult> query(Statement statement)
Description copied from interface:AsyncBucketQueries a N1QL secondary index with a simpleStatement. The returnedObservablecan error 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- Specified by:
queryin interfaceAsyncBucket- Parameters:
statement- the statement in a DSL form (start with a static select() import).- Returns:
- a result containing all found rows and additional information.
-
query
public rx.Observable<AsyncN1qlQueryResult> query(N1qlQuery query)
Description copied from interface:AsyncBucketQueries a N1QL secondary index. The returnedObservablecan error 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- Specified by:
queryin interfaceAsyncBucket- Parameters:
query- the fullN1qlQuery.- Returns:
- a result containing all found rows and additional information.
-
query
public rx.Observable<AsyncN1qlQueryResult> query(N1qlQuery query, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketQueries a N1QL secondary index with a custom timeout. The returnedObservablecan error 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- Specified by:
queryin interfaceAsyncBucket- Parameters:
query- the fullN1qlQuery.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a result containing all found rows and additional information.
-
query
public rx.Observable<AsyncAnalyticsQueryResult> query(AnalyticsQuery query)
Description copied from interface:AsyncBucketQueries Couchbase Analytics- Specified by:
queryin interfaceAsyncBucket- Parameters:
query- the query builder.- Returns:
- a query result containing the rows and additional information.
-
query
public rx.Observable<AsyncAnalyticsQueryResult> query(AnalyticsQuery query, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketQueries Couchbase Analytics- Specified by:
queryin interfaceAsyncBucket- Parameters:
query- the query builder.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a query result containing the rows and additional information.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. The returnedObservablecan error 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- If the document does not exist:DocumentDoesNotExistException. - Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
counterin interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. It is not allowed that the delta value will bring the actual value below zero. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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.- Specified by:
counterin interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, int expiry, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. 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 usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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.- Specified by:
counterin interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.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.
-
unlock
public rx.Observable<Boolean> unlock(String id, long cas, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketUnlocks a write-lockedDocument. The returnedObservablecan error under the following conditions: - A transient error happened, most likely the CAS value was not correct:TemporaryLockFailureException- 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- 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:
unlockin interfaceAsyncBucket- Parameters:
id- the id of the document to unlock.cas- the CAS value which is mandatory to unlock it.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a Boolean indicating if the unlock was successful or not.
-
unlock
public <D extends Document<?>> rx.Observable<Boolean> unlock(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketUnlocks a write-lockedDocument. The returnedObservablecan error under the following conditions: - The document doesn't exist:DocumentDoesNotExistException- A transient error happened, most likely the CAS value was not correct:TemporaryLockFailureException- 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- 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:
unlockin interfaceAsyncBucket- Parameters:
document- the document where ID and CAS are extracted from.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a Boolean indicating if the unlock was successful. (note that unsuccessful touch will rather raise an exception)
-
unlock
public rx.Observable<Boolean> unlock(String id, long cas)
Description copied from interface:AsyncBucketUnlocks a write-lockedDocument. The returnedObservablecan error under the following conditions: - A transient error happened, most likely the CAS value was not correct:TemporaryLockFailureException- 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- 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:
unlockin interfaceAsyncBucket- Parameters:
id- the id of the document to unlock.cas- the CAS value which is mandatory to unlock it.- Returns:
- a Boolean indicating if the unlock was successful or not.
-
unlock
public <D extends Document<?>> rx.Observable<Boolean> unlock(D document)
Description copied from interface:AsyncBucketUnlocks a write-lockedDocument. The returnedObservablecan error under the following conditions: - The document doesn't exist:DocumentDoesNotExistException- A transient error happened, most likely the CAS value was not correct:TemporaryLockFailureException- 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- 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:
unlockin interfaceAsyncBucket- Parameters:
document- the document where ID and CAS are extracted from.- Returns:
- a Boolean indicating if the unlock was successful. (note that unsuccessful touch will rather raise an exception)
-
touch
public rx.Observable<Boolean> touch(String id, int expiry, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRenews the expiration time of aDocument. Compared toAsyncBucket.getAndTouch(Document), this method does not actually fetch the document from the server, but it just resets its expiration time to the given value. The returnedObservablecan error under the following conditions: - The document doesn't exist:DocumentDoesNotExistException- 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:
touchin interfaceAsyncBucket- Parameters:
id- the id of the document.expiry- the new expiration time. 0 means no expiry.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a Boolean indicating if the touch had been successful. (note that unsuccessful touch will rather raise an exception)
-
touch
public <D extends Document<?>> rx.Observable<Boolean> touch(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketRenews the expiration time of aDocument. Compared toAsyncBucket.getAndTouch(Document), this method does not actually fetch the document from the server, but it just resets its expiration time to the given value. The returnedObservablecan error 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.- Specified by:
touchin interfaceAsyncBucket- Parameters:
document- the document to extract the ID and expiry from.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a copy of the document inserted.
-
touch
public rx.Observable<Boolean> touch(String id, int expiry)
Description copied from interface:AsyncBucketRenews the expiration time of aDocument. Compared toAsyncBucket.getAndTouch(Document), this method does not actually fetch the document from the server, but it just resets its expiration time to the given value. The returnedObservablecan error under the following conditions: - The document doesn't exist:DocumentDoesNotExistException- 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:
touchin interfaceAsyncBucket- Parameters:
id- the id of the document.expiry- the new expiration time. 0 means no expiry.- Returns:
- a Boolean indicating if the touch had been successful. (note that unsuccessful touch will rather raise an exception)
-
touch
public <D extends Document<?>> rx.Observable<Boolean> touch(D document)
Description copied from interface:AsyncBucketRenews the expiration time of aDocument. Compared toAsyncBucket.getAndTouch(Document), this method does not actually fetch the document from the server, but it just resets its expiration time to the given value. The returnedObservablecan error 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.- Specified by:
touchin interfaceAsyncBucket- Parameters:
document- the document to extract the ID and expiry from.- Returns:
- a copy of the document inserted.
-
append
public <D extends Document<?>> rx.Observable<D> append(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketAppend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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.- Specified by:
appendin interfaceAsyncBucket- Parameters:
document- the document, identified by its id, from which the content is appended to the existing one.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<?>> rx.Observable<D> prepend(D document, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketPrepend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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.- Specified by:
prependin interfaceAsyncBucket- Parameters:
document- the document, identified by its id, from which the content is prepended to the existing one.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a document which mirrors the one supplied as an argument.
-
bucketManager
public rx.Observable<AsyncBucketManager> bucketManager()
Description copied from interface:AsyncBucketProvides access to theAsyncBucketManagerfor administrative access. The manager lets you perform operations such as flushing a bucket or creating and managing design documents.- Specified by:
bucketManagerin interfaceAsyncBucket- Returns:
- the bucket manager for administrative operations.
-
insert
public <D extends Document<?>> rx.Observable<D> insert(D document, PersistTo persistTo)
Description copied from interface:AsyncBucketInsert aDocumentif it does not exist already and watch for durability constraints. This method works exactly likeAsyncBucket.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. The returnedObservablecan error 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 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.**- Specified by:
insertin interfaceAsyncBucket- Parameters:
document- theDocumentto insert.persistTo- the persistence constraint to watch.- Returns:
- an
Observableeventually containing a newDocument.
-
insert
public <D extends Document<?>> rx.Observable<D> insert(D document, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketInsert aDocumentif it does not exist already and watch for durability constraints. This method works exactly likeAsyncBucket.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. The returnedObservablecan error 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 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.**- Specified by:
insertin interfaceAsyncBucket- Parameters:
document- theDocumentto insert.replicateTo- the replication constraint to watch.- Returns:
- an
Observableeventually containing a newDocument.
-
upsert
public <D extends Document<?>> rx.Observable<D> upsert(D document, PersistTo persistTo)
Description copied from interface:AsyncBucketInsert or overwrite aDocumentand watch for durability constraints. This method works exactly likeAsyncBucket.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, theAsyncBucket.replace(Document, PersistTo)method needs to be used. The returnedObservablecan error 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 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.**- Specified by:
upsertin interfaceAsyncBucket- Parameters:
document- theDocumentto upsert.persistTo- the persistence constraint to watch.- Returns:
- an
Observableeventually containing a newDocument.
-
upsert
public <D extends Document<?>> rx.Observable<D> upsert(D document, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketInsert or overwrite aDocumentand watch for durability constraints. This method works exactly likeAsyncBucket.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, theAsyncBucket.replace(Document, ReplicateTo)method needs to be used. The returnedObservablecan error 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 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.**- Specified by:
upsertin interfaceAsyncBucket- Parameters:
document- theDocumentto upsert.replicateTo- the replication constraint to watch.- Returns:
- an
Observableeventually containing a newDocument.
-
replace
public <D extends Document<?>> rx.Observable<D> replace(D document, PersistTo persistTo)
Description copied from interface:AsyncBucketReplace aDocumentif it does exist and watch for durability constraints. This method works exactly likeAsyncBucket.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. The returnedObservablecan error 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 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.**- Specified by:
replacein interfaceAsyncBucket- Parameters:
document- theDocumentto replace.persistTo- the persistence constraint to watch.- Returns:
- an
Observableeventually containing a newDocument.
-
replace
public <D extends Document<?>> rx.Observable<D> replace(D document, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketReplace aDocumentif it does exist and watch for durability constraints. This method works exactly likeAsyncBucket.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. The returnedObservablecan error 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 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.**- Specified by:
replacein interfaceAsyncBucket- Parameters:
document- theDocumentto replace.replicateTo- the replication constraint to watch.- Returns:
- an
Observableeventually containing a newDocument.
-
remove
public <D extends Document<?>> rx.Observable<D> remove(D document, PersistTo persistTo)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server and apply a durability requirement. 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. The returnedObservablecan error 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. - The document to remove does not exist:DocumentDoesNotExistException- 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- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
removein interfaceAsyncBucket- Parameters:
document- the document to remove, with the ID extracted.persistTo- the persistence constraint to watch.- Returns:
- the document containing the ID.
-
remove
public <D extends Document<?>> rx.Observable<D> remove(D document, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server and apply a durability requirement. 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. The returnedObservablecan error 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. - The document to remove does not exist:DocumentDoesNotExistException- 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- Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
removein interfaceAsyncBucket- Parameters:
document- the document to remove, with the ID extracted.replicateTo- the replication constraint to watch.- Returns:
- the document containing the ID.
-
remove
public rx.Observable<JsonDocument> remove(String id, PersistTo persistTo)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement. 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. The returnedObservablecan error 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 document to remove does not exist:DocumentDoesNotExistException- 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.- Specified by:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.persistTo- the persistence constraint to watch.- Returns:
- the document containing the ID.
-
remove
public rx.Observable<JsonDocument> remove(String id, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement. 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. The returnedObservablecan error 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 document to remove does not exist:DocumentDoesNotExistException- 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.- Specified by:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.replicateTo- the replication constraint to watch.- Returns:
- the document containing the ID.
-
remove
public <D extends Document<?>> rx.Observable<D> remove(String id, PersistTo persistTo, Class<D> target)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement. 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. The returnedObservablecan error 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. - The document to remove 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:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.persistTo- the persistence constraint to watch.target- the target document type to use.- Returns:
- the document containing the ID.
-
remove
public <D extends Document<?>> rx.Observable<D> remove(String id, ReplicateTo replicateTo, Class<D> target)
Description copied from interface:AsyncBucketRemoves aDocumentfrom the Server by its ID and apply a durability requirement. 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. The returnedObservablecan error 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. - The document to remove 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:
removein interfaceAsyncBucket- Parameters:
id- the id of the document to remove.replicateTo- the replication constraint to watch.target- the target document type to use.- Returns:
- the document containing the ID.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet. 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 usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.persistTo- the persistence constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet. It is not allowed that the delta value will bring the actual value below zero. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. It is not allowed that the delta value will bring the actual value below zero. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.persistTo- the persistence constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. It is not allowed that the delta value will bring the actual value below zero. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.replicateTo- the replication constraint to watch.timeout- the custom timeout.timeUnit- the unit for the timeout.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, int expiry, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. 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 usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.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 rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, int expiry, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. 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 usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.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 rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. It is not allowed that the delta value will bring the actual value below zero. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.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 rx.Observable<JsonLongDocument> counter(String id, long delta, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet. It is not allowed that the delta value will bring the actual value below zero. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- 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 rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, int expiry, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. 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 usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.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.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. It is not allowed that the delta value will bring the actual value below zero. The returnedObservablecan error 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- If the document does not exist:DocumentDoesNotExistException. - Unexpected errors are caught and contained in a genericCouchbaseException.- Specified by:
counterin interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, PersistTo persistTo)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet. 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 usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.persistTo- the persistence constraint to watch.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet. It is not allowed that the delta value will bring the actual value below zero. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.replicateTo- the replication constraint to watch.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value or throw an exception if it does not exist yet. It is not allowed that the delta value will bring the actual value below zero. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- 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.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, long initial)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. It is not allowed that the delta value will bring the actual value below zero. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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.- Specified by:
counterin interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, PersistTo persistTo)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. It is not allowed that the delta value will bring the actual value below zero. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.persistTo- the persistence constraint to watch.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. It is not allowed that the delta value will bring the actual value below zero. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.replicateTo- the replication constraint to watch.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. It is not allowed that the delta value will bring the actual value below zero. The initial value for the counter can be set by passing the initial value in {@link #counter)} or usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.persistTo- the persistence constraint to watch.replicateTo- the replication constraint to watch.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, int expiry)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. 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 usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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.- Specified by:
counterin interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.expiry- the new expiration time for the document, only used on creation.- Returns:
- a
Documentcontaining the resulting value.
-
counter
public rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, int expiry, PersistTo persistTo)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. 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 usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.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 rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, int expiry, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. 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 usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.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 rx.Observable<JsonLongDocument> counter(String id, long delta, long initial, int expiry, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketIncrement or decrement a counter with the given value and a initial value if it does not exist. 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 usingAsyncBucket.insert(D)to create aJsonLongDocument. The value can also be modified by usingAsyncBucket.upsert(D)withJsonLongDocument. The returnedObservablecan error 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- 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 interfaceAsyncBucket- Parameters:
id- the id of the document.delta- the increment or decrement amount.initial- the initial value to use if the document does not exist yet.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.
-
append
public <D extends Document<?>> rx.Observable<D> append(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketAppend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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 interfaceAsyncBucket- 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<?>> rx.Observable<D> append(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketAppend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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 interfaceAsyncBucket- 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<?>> rx.Observable<D> append(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketAppend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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 interfaceAsyncBucket- 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<?>> rx.Observable<D> prepend(D document, PersistTo persistTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketPrepend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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 interfaceAsyncBucket- 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<?>> rx.Observable<D> prepend(D document, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketPrepend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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 interfaceAsyncBucket- 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<?>> rx.Observable<D> prepend(D document, PersistTo persistTo, ReplicateTo replicateTo, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketPrepend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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 interfaceAsyncBucket- 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.
-
append
public <D extends Document<?>> rx.Observable<D> append(D document)
Description copied from interface:AsyncBucketAppend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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.- Specified by:
appendin interfaceAsyncBucket- Parameters:
document- the document, identified by its id, from which the content is appended to the existing one.- Returns:
- a document which mirrors the one supplied as an argument.
-
append
public <D extends Document<?>> rx.Observable<D> append(D document, PersistTo persistTo)
Description copied from interface:AsyncBucketAppend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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 interfaceAsyncBucket- Parameters:
document- the document, identified by its id, from which the content is appended to the existing one.persistTo- the persistence constraint to watch.- Returns:
- a document which mirrors the one supplied as an argument.
-
append
public <D extends Document<?>> rx.Observable<D> append(D document, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketAppend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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 interfaceAsyncBucket- Parameters:
document- the document, identified by its id, from which the content is appended to the existing one.replicateTo- the replication constraint to watch.- Returns:
- a document which mirrors the one supplied as an argument.
-
append
public <D extends Document<?>> rx.Observable<D> append(D document, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketAppend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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 interfaceAsyncBucket- 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.
-
prepend
public <D extends Document<?>> rx.Observable<D> prepend(D document)
Description copied from interface:AsyncBucketPrepend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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.- Specified by:
prependin interfaceAsyncBucket- Parameters:
document- the document, identified by its id, from which the content is prepended to the existing one.- Returns:
- a document which mirrors the one supplied as an argument.
-
prepend
public <D extends Document<?>> rx.Observable<D> prepend(D document, PersistTo persistTo)
Description copied from interface:AsyncBucketPrepend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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 interfaceAsyncBucket- Parameters:
document- the document, identified by its id, from which the content is prepended to the existing one.persistTo- the persistence constraint to watch.- Returns:
- a document which mirrors the one supplied as an argument.
-
prepend
public <D extends Document<?>> rx.Observable<D> prepend(D document, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketPrepend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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 interfaceAsyncBucket- Parameters:
document- the document, identified by its id, from which the content is prepended to the existing one.replicateTo- the replication constraint to watch.- Returns:
- a document which mirrors the one supplied as an argument.
-
prepend
public <D extends Document<?>> rx.Observable<D> prepend(D document, PersistTo persistTo, ReplicateTo replicateTo)
Description copied from interface:AsyncBucketPrepend aDocuments content to an existing one. 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 separateAsyncBucket.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. The returnedObservablecan error 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 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 interfaceAsyncBucket- 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.
-
lookupIn
public AsyncLookupInBuilder lookupIn(String docId)
Description copied from interface:AsyncBucketPrepare 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 asynchronously by calling theAsyncLookupInBuilder.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 interfaceAsyncBucket- Parameters:
docId- the id of the JSON document to lookup in.- Returns:
- a builder to describe the lookup(s) to perform.
- See Also:
AsyncLookupInBuilder.execute()
-
mutateIn
public AsyncMutateInBuilder mutateIn(String docId)
Description copied from interface:AsyncBucketPrepare 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 asynchronously by calling theAsyncMutateInBuilder.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 interfaceAsyncBucket- Parameters:
docId- the id of the JSON document to mutate in.- Returns:
- a builder to describe the mutation(s) to perform.
- See Also:
AsyncMutateInBuilder.execute()
-
mapGet
public <V> rx.Observable<V> mapGet(String docId, String key, Class<V> valueType)
Description copied from interface:AsyncBucketGet 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.- Specified by:
mapGetin interfaceAsyncBucket- Parameters:
docId- document id backing the mapkey- key in the mapvalueType- value type class- Returns:
- value if found
-
mapAdd
public <V> rx.Observable<Boolean> mapAdd(String docId, String key, V value)
Description copied from interface:AsyncBucketAdd a key value pair into 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.- Specified by:
mapAddin interfaceAsyncBucket- Parameters:
docId- document id backing the mapkey- key to be storedvalue- value to be stored- Returns:
- true if successful
-
mapAdd
public <V> rx.Observable<Boolean> mapAdd(String docId, String key, V value, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:AsyncBucketAdd a key value pair into CouchbaseMap with additional mutation options provided byMutationOptionBuilderThis method throws under the following conditions: -IllegalStateExceptionif the map is full (limited by couchbase document size) - 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:
mapAddin interfaceAsyncBucket- Parameters:
docId- document id backing the mapkey- key to be storedvalue- value to be storedmutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- true if successful
-
mapRemove
public rx.Observable<Boolean> mapRemove(String docId, String key)
Description copied from interface:AsyncBucketRemove 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.- Specified by:
mapRemovein interfaceAsyncBucket- Parameters:
docId- document id backing the mapkey- key to be removed- Returns:
- true if successful, even if the key doesn't exist
-
mapRemove
public rx.Observable<Boolean> mapRemove(String docId, String key, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:AsyncBucketRemove a key value pair from CouchbaseMap 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:
mapRemovein interfaceAsyncBucket- Parameters:
docId- document id backing the mapkey- key to be removed- Returns:
- true if successful, even if the key doesn't exist
-
mapSize
public rx.Observable<Integer> mapSize(String docId)
Description copied from interface:AsyncBucketReturns 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.- Specified by:
mapSizein interfaceAsyncBucket- Parameters:
docId- document id backing the map- Returns:
- number of key value pairs
-
listGet
public <E> rx.Observable<E> listGet(String docId, int index, Class<E> elementType)
Description copied from interface:AsyncBucketGet element at an index in the 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 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.- Specified by:
listGetin interfaceAsyncBucket- Parameters:
docId- document id backing the listindex- index in listelementType- element type class- Returns:
- value if found
-
listAppend
public <E> rx.Observable<Boolean> listAppend(String docId, E element)
Description copied from interface:AsyncBucketPush 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 interfaceAsyncBucket- Parameters:
docId- document id backing the listelement- element to be pushed into the queue- Returns:
- true if successful
-
listAppend
public <E> rx.Observable<Boolean> listAppend(String docId, E element, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:AsyncBucketPush 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- 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:
listAppendin interfaceAsyncBucket- Parameters:
docId- document id backing the listelement- element to be pushed into the queuemutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- true if successful
-
listRemove
public rx.Observable<Boolean> listRemove(String docId, int index)
Description copied from interface:AsyncBucketRemove 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 interfaceAsyncBucket- Parameters:
docId- document id backing the listindex- index of the element in list- Returns:
- true if successful
-
listRemove
public rx.Observable<Boolean> listRemove(String docId, int index, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:AsyncBucketRemove 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 interfaceAsyncBucket- Parameters:
docId- document id backing the listindex- index of the element in listmutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- true if successful
-
listSet
public <E> rx.Observable<Boolean> listSet(String docId, int index, E element)
Description copied from interface:AsyncBucketAdd 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- 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:
listSetin interfaceAsyncBucket- Parameters:
docId- document id backing the listindex- index in the listelement- element to be added- Returns:
- true if successful
-
listSet
public <E> rx.Observable<Boolean> listSet(String docId, int index, E element, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:AsyncBucketAdd an element at an index in 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:
listSetin interfaceAsyncBucket- Parameters:
docId- document id backing the listindex- index in the listelement- element to be addedmutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- true if successful
-
listPrepend
public <E> rx.Observable<Boolean> listPrepend(String docId, E element)
Description copied from interface:AsyncBucketShift list head to element in CouchbaseList This method throws under the following conditions: -IllegalStateExceptionif the list is full (limited by couchbase document size) - 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 interfaceAsyncBucket- Parameters:
docId- document id backing the listelement- element to shift as head of list- Returns:
- true if successful
-
listPrepend
public <E> rx.Observable<Boolean> listPrepend(String docId, E element, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:AsyncBucketShift 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. - 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 interfaceAsyncBucket- Parameters:
docId- document id backing the listelement- element to shift as head of listmutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- true if successful
-
listSize
public rx.Observable<Integer> listSize(String docId)
Description copied from interface:AsyncBucketReturns 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.- Specified by:
listSizein interfaceAsyncBucket- Parameters:
docId- document id backing the list- Returns:
- number of elements
-
setAdd
public <E> rx.Observable<Boolean> setAdd(String docId, E element)
Description copied from interface:AsyncBucketAdd 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.- Specified by:
setAddin interfaceAsyncBucket- Parameters:
docId- document id backing the setelement- element to be pushed into the set- Returns:
- true if successful, false if the element exists in set
-
setAdd
public <E> rx.Observable<Boolean> setAdd(String docId, E element, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:AsyncBucketAdd 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 interfaceAsyncBucket- 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
-
setContains
public <E> rx.Observable<Boolean> setContains(String docId, E element)
Description copied from interface:AsyncBucketCheck 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 interfaceAsyncBucket- Parameters:
docId- document id backing the setelement- element to check for existence- Returns:
- true if element exists, false if the element does not exist
-
setRemove
public <E> rx.Observable<E> setRemove(String docId, E element)
Description copied from interface:AsyncBucketRemoves 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.- Specified by:
setRemovein interfaceAsyncBucket- Parameters:
docId- document id backing the setelement- element to be removed- Returns:
- element removed from set (fails silently by returning the element is not found in set)
-
setRemove
public <E> rx.Observable<E> setRemove(String docId, E element, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:AsyncBucketRemoves 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 interfaceAsyncBucket- 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)
-
setSize
public rx.Observable<Integer> setSize(String docId)
Description copied from interface:AsyncBucketReturns 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.- Specified by:
setSizein interfaceAsyncBucket- Parameters:
docId- document id backing the set- Returns:
- number of elements in set
-
queuePush
public <E> rx.Observable<Boolean> queuePush(String docId, E element)
Description copied from interface:AsyncBucketAdd 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.- Specified by:
queuePushin interfaceAsyncBucket- Parameters:
docId- document id backing the queueelement- element to be pushed into the queue- Returns:
- true if successful
-
queuePush
public <E> rx.Observable<Boolean> queuePush(String docId, E element, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:AsyncBucketAdd 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 interfaceAsyncBucket- Parameters:
docId- document id backing the queueelement- element to be pushed into the queuemutationOptionBuilder- mutation optionsMutationOptionBuilder- Returns:
- true if successful
-
queuePop
public <E> rx.Observable<E> queuePop(String docId, Class<E> elementType)
Description copied from interface:AsyncBucketRemoves 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.- Specified by:
queuePopin interfaceAsyncBucket- Parameters:
docId- document id backing the queueelementType- element type class- Returns:
- element removed from queue
-
queuePop
public <E> rx.Observable<E> queuePop(String docId, Class<E> elementType, MutationOptionBuilder mutationOptionBuilder)
Description copied from interface:AsyncBucketRemoves 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.- Specified by:
queuePopin interfaceAsyncBucket- Parameters:
docId- document id backing the queueelementType- element type class- Returns:
- element removed from queue
-
queueSize
public rx.Observable<Integer> queueSize(String docId)
Description copied from interface:AsyncBucketReturns 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.- Specified by:
queueSizein interfaceAsyncBucket- Parameters:
docId- document id backing the queue- Returns:
- number of elements
-
close
public rx.Observable<Boolean> close()
Description copied from interface:AsyncBucketCloses theAsyncBucket.- Specified by:
closein interfaceAsyncBucket- Returns:
- an
Observableeventually containing a newBooleanafter close.
-
isClosed
public boolean isClosed()
Description copied from interface:AsyncBucketReturns true if this bucket is already closed, false if it is still open.- Specified by:
isClosedin interfaceAsyncBucket- Returns:
- true if closed, false otherwise.
-
invalidateQueryCache
public rx.Observable<Integer> invalidateQueryCache()
Description copied from interface:AsyncBucketInvalidates 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. The returnedObservablewill not error out under any conditions.- Specified by:
invalidateQueryCachein interfaceAsyncBucket- Returns:
- the number of entries in the cache before it was cleared out.
-
ping
public rx.Single<PingReport> ping(String reportId, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketPerforms 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).- Specified by:
pingin interfaceAsyncBucket- Parameters:
reportId- the report ID to use in the report.timeout- the timeout for each individual service.timeUnit- the unit for the timeout.- Returns:
- a ping report once created.
-
ping
public rx.Single<PingReport> ping(long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketPerforms a diagnostic active "ping" call on all services with a random service 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).- Specified by:
pingin interfaceAsyncBucket- Parameters:
timeout- the timeout for each individual service.timeUnit- the unit for the timeout.- Returns:
- a ping report once created.
-
ping
public rx.Single<PingReport> ping(Collection<ServiceType> services, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketPerforms a diagnostic active "ping" call on a list of services with a random service 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).- Specified by:
pingin interfaceAsyncBucket- Parameters:
services- collection of services which should be included.timeout- the timeout for each individual service.timeUnit- the unit for the timeout.- Returns:
- a ping report once created.
-
ping
public rx.Single<PingReport> ping(String reportId, Collection<ServiceType> services, long timeout, TimeUnit timeUnit)
Description copied from interface:AsyncBucketPerforms 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).- Specified by:
pingin interfaceAsyncBucket- Parameters:
reportId- the report ID to use in the report.services- collection of services which should be included.timeout- the timeout for each individual service.timeUnit- the unit for the timeout.- Returns:
- a ping report once created.
-
-