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
Transcoder s. |
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()
AsyncCluster
Opens the default bucket with an empty password.
The Observable
can error under the following conditions:
openBucket
in interface AsyncCluster
public rx.Observable<AsyncBucket> openBucket(java.lang.String name)
AsyncCluster
Opens the bucket with the given name and an empty password.
The Observable
can error under the following conditions:
openBucket
in interface AsyncCluster
name
- the name of the bucket.public rx.Observable<AsyncBucket> openBucket(java.lang.String name, java.lang.String pass)
AsyncCluster
Opens the bucket with the given name and password.
The Observable
can error under the following conditions:
openBucket
in interface AsyncCluster
name
- 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)
AsyncCluster
Opens the bucket with the given name, password and a custom list of Transcoder
s.
The Observable
can error under the following conditions:
openBucket
in interface AsyncCluster
name
- the name of the bucket.public rx.Observable<java.lang.Boolean> disconnect()
AsyncCluster
Disconnects form all open buckets and shuts down the CouchbaseEnvironment
if it is the exclusive owner.
disconnect
in interface AsyncCluster
public rx.Observable<AsyncClusterManager> clusterManager(java.lang.String username, java.lang.String password)
AsyncCluster
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.
clusterManager
in interface AsyncCluster
username
- 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()
AsyncCluster
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.
core
in interface AsyncCluster
ClusterFacade
from the “core-io” package.