public class CouchbaseAsyncCluster extends Object implements AsyncCluster
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_BUCKET |
static String |
DEFAULT_HOST |
Modifier and Type | Method and Description |
---|---|
Observable<AsyncClusterManager> |
clusterManager(String username,
String password)
Provides access to the
AsyncClusterManager to perform cluster-wide operations. |
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,
List<String> nodes) |
static CouchbaseAsyncCluster |
create(CouchbaseEnvironment environment,
String... nodes) |
static CouchbaseAsyncCluster |
create(List<String> nodes) |
static CouchbaseAsyncCluster |
create(String... nodes) |
Observable<Boolean> |
disconnect()
Disconnects form all open buckets and shuts down the
CouchbaseEnvironment if it is the exclusive owner. |
static CouchbaseAsyncCluster |
fromConnectionString(CouchbaseEnvironment environment,
String connectionString) |
static CouchbaseAsyncCluster |
fromConnectionString(String connectionString) |
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 pass)
Opens the bucket with the given name and password.
|
Observable<AsyncBucket> |
openBucket(String name,
String pass,
List<Transcoder<? extends Document,?>> transcoders)
Opens the bucket with the given name, password and a custom list of
Transcoder s. |
public static final String DEFAULT_BUCKET
public static final String DEFAULT_HOST
public static CouchbaseAsyncCluster create()
public static CouchbaseAsyncCluster create(CouchbaseEnvironment environment)
public static CouchbaseAsyncCluster create(String... nodes)
public static CouchbaseAsyncCluster create(List<String> nodes)
public static CouchbaseAsyncCluster create(CouchbaseEnvironment environment, String... nodes)
public static CouchbaseAsyncCluster create(CouchbaseEnvironment environment, List<String> nodes)
public static CouchbaseAsyncCluster fromConnectionString(String connectionString)
public static CouchbaseAsyncCluster fromConnectionString(CouchbaseEnvironment environment, String connectionString)
public 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 Observable<AsyncBucket> openBucket(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 Observable<AsyncBucket> openBucket(String name, 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 Observable<AsyncBucket> openBucket(String name, String pass, 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 Observable<Boolean> disconnect()
AsyncCluster
Disconnects form all open buckets and shuts down the CouchbaseEnvironment
if it is the exclusive owner.
disconnect
in interface AsyncCluster
public Observable<AsyncClusterManager> clusterManager(String username, 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 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.Copyright © 2014 Couchbase, Inc.