@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 |
---|---|
Observable<AsyncClusterManager> |
clusterManager(String username,
String password)
Provides access to the
AsyncClusterManager to perform cluster-wide operations. |
Observable<ClusterFacade> |
core()
Returns the underlying “core-io” library through its
ClusterFacade . |
Observable<Boolean> |
disconnect()
Disconnects form all open buckets and shuts down the
CouchbaseEnvironment if it is the exclusive owner. |
Observable<AsyncBucket> |
openBucket()
Opens the default bucket with an empty password.
|
Observable<AsyncBucket> |
openBucket(String name)
Opens the bucket with the given name and an empty password.
|
Observable<AsyncBucket> |
openBucket(String name,
String password)
Opens the bucket with the given name and password.
|
Observable<AsyncBucket> |
openBucket(String name,
String password,
List<Transcoder<? extends Document,?>> transcoders)
Opens the bucket with the given name, password and a custom list of
Transcoder s. |
Observable<AsyncBucket> openBucket()
Opens the default bucket with an empty password.
The Observable
can error under the following conditions:
Observable<AsyncBucket> openBucket(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.Observable<AsyncBucket> openBucket(String name, 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.Observable<AsyncBucket> openBucket(String name, String password, 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.Observable<AsyncClusterManager> clusterManager(String username, 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.Observable<Boolean> disconnect()
Disconnects form all open buckets and shuts down the CouchbaseEnvironment
if it is the exclusive owner.
Observable<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.Copyright © 2015 Couchbase, Inc.