public class CouchbaseAsyncCluster extends java.lang.Object implements AsyncCluster
| 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. |
static CouchbaseAsyncCluster |
create() |
static CouchbaseAsyncCluster |
create(CouchbaseEnvironment environment) |
static CouchbaseAsyncCluster |
create(CouchbaseEnvironment environment,
java.util.List<java.lang.String> nodes) |
static CouchbaseAsyncCluster |
create(CouchbaseEnvironment environment,
java.lang.String... nodes) |
static CouchbaseAsyncCluster |
create(java.util.List<java.lang.String> nodes) |
static CouchbaseAsyncCluster |
create(java.lang.String... nodes) |
rx.Observable<java.lang.Boolean> |
disconnect()
Disconnects form all open buckets and shuts down the
CouchbaseEnvironment if it is the exclusive owner. |
static CouchbaseAsyncCluster |
fromConnectionString(CouchbaseEnvironment environment,
java.lang.String connectionString) |
static CouchbaseAsyncCluster |
fromConnectionString(java.lang.String connectionString) |
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 pass)
Opens the bucket with the given name and password.
|
rx.Observable<AsyncBucket> |
openBucket(java.lang.String name,
java.lang.String pass,
java.util.List<Transcoder<? extends Document,?>> transcoders)
Opens the bucket with the given name, password and a custom list of
Transcoders. |
public static CouchbaseAsyncCluster create()
public static CouchbaseAsyncCluster create(CouchbaseEnvironment environment)
public static CouchbaseAsyncCluster create(java.lang.String... nodes)
public static CouchbaseAsyncCluster create(java.util.List<java.lang.String> nodes)
public static CouchbaseAsyncCluster create(CouchbaseEnvironment environment, java.lang.String... nodes)
public static CouchbaseAsyncCluster create(CouchbaseEnvironment environment, java.util.List<java.lang.String> nodes)
public static CouchbaseAsyncCluster fromConnectionString(java.lang.String connectionString)
public static CouchbaseAsyncCluster fromConnectionString(CouchbaseEnvironment environment, java.lang.String connectionString)
public rx.Observable<AsyncBucket> openBucket()
AsyncClusterOpens the default bucket with an empty password.
The Observable can error under the following conditions:
openBucket in interface AsyncClusterpublic rx.Observable<AsyncBucket> openBucket(java.lang.String name)
AsyncClusterOpens the bucket with the given name and an empty password.
The Observable can error under the following conditions:
openBucket in interface AsyncClustername - the name of the bucket.public rx.Observable<AsyncBucket> openBucket(java.lang.String name, java.lang.String pass)
AsyncClusterOpens the bucket with the given name and password.
The Observable can error under the following conditions:
openBucket in interface AsyncClustername - the name of the bucket.public rx.Observable<AsyncBucket> openBucket(java.lang.String name, java.lang.String pass, java.util.List<Transcoder<? extends Document,?>> transcoders)
AsyncClusterOpens the bucket with the given name, password and a custom list of Transcoders.
The Observable can error under the following conditions:
openBucket in interface AsyncClustername - the name of the bucket.public rx.Observable<java.lang.Boolean> disconnect()
AsyncClusterDisconnects form all open buckets and shuts down the CouchbaseEnvironment if it is the exclusive owner.
disconnect in interface AsyncClusterpublic rx.Observable<AsyncClusterManager> clusterManager(java.lang.String username, java.lang.String password)
AsyncClusterProvides 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.
clusterManager in interface AsyncClusterusername - the username to perform cluster-wide operations.password - the password associated with the username.AsyncClusterManager if successful.public rx.Observable<com.couchbase.client.core.ClusterFacade> core()
AsyncClusterReturns 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.
core in interface AsyncClusterClusterFacade from the “core-io” package.