public class DefaultAsyncClusterManager extends Object implements AsyncClusterManager
public static DefaultAsyncClusterManager create(String username, String password, ConnectionString connectionString, CouchbaseEnvironment environment, ClusterFacade core)
@InterfaceStability.Experimental public Observable<AsyncClusterApiClient> apiClient()
apiClient in interface AsyncClusterManagerObservable emitting a single new AsyncClusterApiClient to prepare and perform REST API asynchronous requests on this cluster.public Observable<ClusterInfo> info()
AsyncClusterManagerProvides information about the cluster.
The Observable can error under the following conditions:
info in interface AsyncClusterManagerClusterInfo object.public Observable<BucketSettings> getBuckets()
AsyncClusterManagerReturns BucketSettings for all available Buckets.
The Observable can error under the following conditions:
getBuckets in interface AsyncClusterManagerBucketSettings.public Observable<BucketSettings> getBucket(String name)
AsyncClusterManagerReturns the BucketSettings for the Bucket identified by name.
The Observable can error under the following conditions:
getBucket in interface AsyncClusterManagername - the name of the bucket.BucketSettings if found or an empty observable if not found.public Observable<Boolean> hasBucket(String name)
AsyncClusterManagerChecks if the cluster has a Bucket identified by the given name.
The Observable can error under the following conditions:
hasBucket in interface AsyncClusterManagername - the name of the bucket.public Observable<Boolean> removeBucket(String name)
AsyncClusterManagerRemoves a Bucket identified by its name.
The Observable can error under the following conditions:
Note: Removing a Bucket is an asynchronous operation on the server side, so even if the response is returned there is no guarantee that the operation has finished on the server itself.
removeBucket in interface AsyncClusterManagername - the name of the bucket.public Observable<BucketSettings> insertBucket(BucketSettings settings)
AsyncClusterManagerInserts a Bucket with its BucketSettings if it does not already exist.
The Observable can error under the following conditions:
Note: Inserting a Bucket is an asynchronous operation on the server side, so even if the response is returned there is no guarantee that the operation has finished on the server itself.
insertBucket in interface AsyncClusterManagersettings - the bucket settings that should be applied.public Observable<BucketSettings> updateBucket(BucketSettings settings)
AsyncClusterManagerUpdates a Bucket with its BucketSettings if it does already exist.
The Observable can error under the following conditions:
Note: Updating a Bucket is an asynchronous operation on the server side, so even if the response is returned there is no guarantee that the operation has finished on the server itself.
updateBucket in interface AsyncClusterManagersettings - the bucket settings that should be applied.protected String getConfigureBucketPayload(BucketSettings settings, boolean includeName)
Copyright © 2015 Couchbase, Inc.