@InterfaceStability.Committed
@InterfaceAudience.Public
public interface AsyncCluster
Represents a Couchbase Server Cluster
.
A AsyncCluster
is able to open many AsyncBucket
s while sharing the underlying resources very efficiently. In addition, the AsyncClusterManager
is available to perform cluster-wide operations.
Modifier and Type | Method and Description |
---|---|
rx.Observable<AsyncClusterManager> |
clusterManager(java.lang.String username,
java.lang.String password)
Provides access to the
AsyncClusterManager to perform cluster-wide operations. |
rx.Observable<com.couchbase.client.core.ClusterFacade> |
core()
Returns the underlying “core-io” library through its
ClusterFacade . |
rx.Observable<java.lang.Boolean> |
disconnect()
Disconnects form all open buckets and shuts down the
CouchbaseEnvironment if it is the exclusive owner. |
rx.Observable<AsyncBucket> |
openBucket()
Opens the default bucket with an empty password.
|
rx.Observable<AsyncBucket> |
openBucket(java.lang.String name)
Opens the bucket with the given name and an empty password.
|
rx.Observable<AsyncBucket> |
openBucket(java.lang.String name,
java.lang.String password)
Opens the bucket with the given name and password.
|
rx.Observable<AsyncBucket> |
openBucket(java.lang.String name,
java.lang.String password,
java.util.List<Transcoder<? extends Document,?>> transcoders)
Opens the bucket with the given name, password and a custom list of
Transcoder s. |
rx.Observable<AsyncBucket> openBucket()
Opens the default bucket with an empty password.
The Observable
can error under the following conditions:
rx.Observable<AsyncBucket> openBucket(java.lang.String name)
Opens the bucket with the given name and an empty password.
The Observable
can error under the following conditions:
name
- the name of the bucket.rx.Observable<AsyncBucket> openBucket(java.lang.String name, java.lang.String password)
Opens the bucket with the given name and password.
The Observable
can error under the following conditions:
name
- the name of the bucket.rx.Observable<AsyncBucket> openBucket(java.lang.String name, java.lang.String password, java.util.List<Transcoder<? extends Document,?>> transcoders)
Opens the bucket with the given name, password and a custom list of Transcoder
s.
The Observable
can error under the following conditions:
name
- the name of the bucket.rx.Observable<AsyncClusterManager> clusterManager(java.lang.String username, java.lang.String password)
Provides access to the AsyncClusterManager
to perform cluster-wide operations.
Note that the credentials provided here are different from bucket-level credentials. As a rule of thumb, the “Administrator” credentials need to be passed in here or any credentials with enough permissions to perform the underlying operations. Bucket level credentials will not work.
username
- the username to perform cluster-wide operations.password
- the password associated with the username.AsyncClusterManager
if successful.rx.Observable<java.lang.Boolean> disconnect()
Disconnects form all open buckets and shuts down the CouchbaseEnvironment
if it is the exclusive owner.
rx.Observable<com.couchbase.client.core.ClusterFacade> core()
Returns the underlying “core-io” library through its ClusterFacade
.
Handle with care, with great power comes great responsibility. All additional checks which are normally performed by this library are skipped.
ClusterFacade
from the “core-io” package.