public class DefaultAsyncClusterManager extends Object implements AsyncClusterManager
Modifier and Type | Method and Description |
---|---|
static DefaultAsyncClusterManager |
create(String username,
String password,
ConnectionString connectionString,
CouchbaseEnvironment environment,
com.couchbase.client.core.ClusterFacade core) |
Observable<BucketSettings> |
getBucket(String name)
Returns the
BucketSettings for the Bucket identified by name. |
Observable<BucketSettings> |
getBuckets()
Returns
BucketSettings for all available Bucket s. |
Observable<Boolean> |
hasBucket(String name)
Checks if the cluster has a
Bucket identified by the given name. |
Observable<ClusterInfo> |
info()
Provides information about the cluster.
|
Observable<BucketSettings> |
insertBucket(BucketSettings settings)
Inserts a
Bucket with its BucketSettings if it does not already exist. |
Observable<Boolean> |
removeBucket(String name)
Removes a
Bucket identified by its name. |
Observable<BucketSettings> |
updateBucket(BucketSettings settings)
Updates a
Bucket with its BucketSettings if it does already exist. |
public static DefaultAsyncClusterManager create(String username, String password, ConnectionString connectionString, CouchbaseEnvironment environment, com.couchbase.client.core.ClusterFacade core)
public Observable<ClusterInfo> info()
AsyncClusterManager
Provides information about the cluster.
The Observable
can error under the following conditions:
info
in interface AsyncClusterManager
ClusterInfo
object.public Observable<BucketSettings> getBuckets()
AsyncClusterManager
Returns BucketSettings
for all available Bucket
s.
The Observable
can error under the following conditions:
getBuckets
in interface AsyncClusterManager
BucketSettings
.public Observable<BucketSettings> getBucket(String name)
AsyncClusterManager
Returns the BucketSettings
for the Bucket
identified by name.
The Observable
can error under the following conditions:
getBucket
in interface AsyncClusterManager
name
- the name of the bucket.BucketSettings
if found or an empty observable if not found.public Observable<Boolean> hasBucket(String name)
AsyncClusterManager
Checks if the cluster has a Bucket
identified by the given name.
The Observable
can error under the following conditions:
hasBucket
in interface AsyncClusterManager
name
- the name of the bucket.public Observable<Boolean> removeBucket(String name)
AsyncClusterManager
Removes a Bucket
identified by its name.
The Observable
can error under the following conditions:
removeBucket
in interface AsyncClusterManager
name
- the name of the bucket.public Observable<BucketSettings> insertBucket(BucketSettings settings)
AsyncClusterManager
Inserts a Bucket
with its BucketSettings
if it does not already exist.
The Observable
can error under the following conditions:
insertBucket
in interface AsyncClusterManager
settings
- the bucket settings that should be applied.public Observable<BucketSettings> updateBucket(BucketSettings settings)
AsyncClusterManager
Updates a Bucket
with its BucketSettings
if it does already exist.
The Observable
can error under the following conditions:
updateBucket
in interface AsyncClusterManager
settings
- the bucket settings that should be applied.Copyright © 2015 Couchbase, Inc.. All rights reserved.