Package com.couchbase.client.java
Class ReactiveBucket
java.lang.Object
com.couchbase.client.java.ReactiveBucket
public class ReactiveBucket extends Object
Provides access to a Couchbase bucket in a reactive fashion.
-
Method Summary
Modifier and Type Method Description AsyncBucketasync()Provides access to the underlyingAsyncBucket.ReactiveCollectioncollection(String collectionName)Opens the collection with the given name for thisReactiveBucket.ReactiveCollectionManagercollections()Corecore()Provides access to the underlyingCore.ReactiveCollectiondefaultCollection()Opens the default collection for thisReactiveBucket.ReactiveScopedefaultScope()Opens the defaultReactiveScope.ClusterEnvironmentenvironment()Returns the attachedClusterEnvironment.Stringname()Returns the name of theReactiveBucket.Mono<PingResult>ping()Performs application-level ping requests against services in the couchbase cluster.Mono<PingResult>ping(PingOptions options)Performs application-level ping requests with custom options against services in the couchbase cluster.ReactiveScopescope(String name)Opens theReactiveScopewith the given name.ReactiveViewIndexManagerviewIndexes()Mono<ReactiveViewResult>viewQuery(String designDoc, String viewName)Mono<ReactiveViewResult>viewQuery(String designDoc, String viewName, ViewOptions options)Mono<Void>waitUntilReady(Duration timeout)Waits until the desiredClusterStateis reached.Mono<Void>waitUntilReady(Duration timeout, WaitUntilReadyOptions options)Waits until the desiredClusterStateis reached.
-
Method Details
-
async
Provides access to the underlyingAsyncBucket. -
name
Returns the name of theReactiveBucket. -
core
Provides access to the underlyingCore.This is advanced API, use with care!
-
collections
-
viewIndexes
-
environment
Returns the attachedClusterEnvironment. -
scope
Opens theReactiveScopewith the given name.- Parameters:
name- the name of the scope.- Returns:
- the
ReactiveScopeonce opened.
-
defaultScope
Opens the defaultReactiveScope.- Returns:
- the
ReactiveScopeonce opened.
-
defaultCollection
Opens the default collection for thisReactiveBucket.- Returns:
- the
ReactiveCollectiononce opened.
-
collection
Opens the collection with the given name for thisReactiveBucket.- Returns:
- the
ReactiveCollectiononce opened.
-
viewQuery
-
viewQuery
-
ping
Performs application-level ping requests against services in the couchbase cluster.- Returns:
- the
PingResultonce complete.
-
ping
Performs application-level ping requests with custom options against services in the couchbase cluster.- Returns:
- the
PingResultonce complete.
-
waitUntilReady
Waits until the desiredClusterStateis reached.This method will wait until either the cluster state is "online", or the timeout is reached. Since the SDK is bootstrapping lazily, this method allows to eagerly check during bootstrap if all of the services are online and usable before moving on.
- Parameters:
timeout- the maximum time to wait until readiness.- Returns:
- a mono that completes either once ready or timeout.
-
waitUntilReady
Waits until the desiredClusterStateis reached.This method will wait until either the cluster state is "online" by default, or the timeout is reached. Since the SDK is bootstrapping lazily, this method allows to eagerly check during bootstrap if all of the services are online and usable before moving on. You can tune the properties through
WaitUntilReadyOptions.- Parameters:
timeout- the maximum time to wait until readiness.options- the options to customize the readiness waiting.- Returns:
- a mono that completes either once ready or timeout.
-