@InterfaceStability.Committed @InterfaceAudience.Public public interface ClusterManager
Provides management capabilities for a Couchbase Server Cluster.
The underlying asynchronous capabilities can be leveraged through the async() method.
| Modifier and Type | Method and Description |
|---|---|
ClusterApiClient |
apiClient()
Returns a new
ClusterApiClient to prepare and perform REST API synchronous requests on this cluster. |
AsyncClusterManager |
async()
Accesses the underlying
AsyncClusterManager to perform asynchronous operations on the cluster. |
BucketSettings |
getBucket(String name)
Returns the
BucketSettings for the Bucket identified by name with the default management timeout. |
BucketSettings |
getBucket(String name,
long timeout,
TimeUnit timeUnit)
Returns the
BucketSettings for the Bucket identified by name with a custom timeout. |
List<BucketSettings> |
getBuckets()
Returns a list of
BucketSettings for all available Buckets with the default management timeout. |
List<BucketSettings> |
getBuckets(long timeout,
TimeUnit timeUnit)
Returns a list of
BucketSettings for all available Buckets with a custom timeout. |
User |
getUser(AuthDomain domain,
String userid)
Get user info in Couchbase with default management timeout.
|
User |
getUser(AuthDomain domain,
String userid,
long timeout,
TimeUnit timeUnit)
Get user info in Couchbase with custom timeout.
|
List<User> |
getUsers(AuthDomain domain)
Get all users in Couchbase with default management timeout.
|
List<User> |
getUsers(AuthDomain domain,
long timeout,
TimeUnit timeUnit)
Get all users in Couchbase with a custom timeout.
|
Boolean |
hasBucket(String name)
Checks if the cluster has a
Bucket identified by the given name with the default management timeout. |
Boolean |
hasBucket(String name,
long timeout,
TimeUnit timeUnit)
Checks if the cluster has a
Bucket identified by the given name with a custom timeout. |
ClusterInfo |
info()
Provides information about the cluster with the default management timeout.
|
ClusterInfo |
info(long timeout,
TimeUnit timeUnit)
Provides information about the cluster with a custom timeout.
|
BucketSettings |
insertBucket(BucketSettings settings)
Inserts a
Bucket with its BucketSettings if it does not already exist with the default management timeout. |
BucketSettings |
insertBucket(BucketSettings settings,
long timeout,
TimeUnit timeUnit)
Inserts a
Bucket with its BucketSettings if it does not already exist with a custom timeout. |
Boolean |
removeBucket(String name)
Removes a
Bucket identified by its name with the default management timeout. |
Boolean |
removeBucket(String name,
long timeout,
TimeUnit timeUnit)
Removes a
Bucket identified by its name with a custom timeout. |
Boolean |
removeUser(AuthDomain domain,
String username)
Removes a user identified by user name with the default management timeout.
|
Boolean |
removeUser(AuthDomain domain,
String username,
long timeout,
TimeUnit timeUnit)
Removes a user identified by user name with a custom timeout.
|
BucketSettings |
updateBucket(BucketSettings settings)
Updates a
Bucket with its BucketSettings if it does already exist with the default management timeout. |
BucketSettings |
updateBucket(BucketSettings settings,
long timeout,
TimeUnit timeUnit)
Updates a
Bucket with its BucketSettings if it does already exist with a custom timeout. |
Boolean |
upsertUser(AuthDomain domain,
String username,
UserSettings settings)
Creates/Updates a user with its
UserSettings with default management timeout. |
Boolean |
upsertUser(AuthDomain domain,
String username,
UserSettings settings,
long timeout,
TimeUnit timeUnit)
Creates/Updates a user with its
UserSettings with custom timeout. |
AsyncClusterManager async()
Accesses the underlying AsyncClusterManager to perform asynchronous operations on the cluster.
AsyncClusterManager.ClusterInfo info()
Provides information about the cluster with the default management timeout.
This method throws:
ClusterInfo object.ClusterInfo info(long timeout, TimeUnit timeUnit)
Provides information about the cluster with a custom timeout.
This method throws:
timeout - the custom timeout.timeUnit - the time unit for the custom timeout.ClusterInfo object.List<BucketSettings> getBuckets()
Returns a list of BucketSettings for all available Buckets with the default management timeout.
This method throws:
BucketSettings.List<BucketSettings> getBuckets(long timeout, TimeUnit timeUnit)
Returns a list of BucketSettings for all available Buckets with a custom timeout.
This method throws:
timeout - the custom timeout.timeUnit - the time unit for the custom timeout.BucketSettings.BucketSettings getBucket(String name)
Returns the BucketSettings for the Bucket identified by name with the default management timeout.
This method throws:
name - the name of the bucket.BucketSettings if found or null.BucketSettings getBucket(String name, long timeout, TimeUnit timeUnit)
Returns the BucketSettings for the Bucket identified by name with a custom timeout.
This method throws:
name - the name of the bucket.timeout - the custom timeout.timeUnit - the time unit for the custom timeout.BucketSettings if found or null.Boolean hasBucket(String name)
Checks if the cluster has a Bucket identified by the given name with the default management timeout.
This method throws:
name - the name of the bucket.Boolean hasBucket(String name, long timeout, TimeUnit timeUnit)
Checks if the cluster has a Bucket identified by the given name with a custom timeout.
This method throws:
name - the name of the bucket.timeout - the custom timeout.timeUnit - the time unit for the custom timeout.BucketSettings insertBucket(BucketSettings settings)
Inserts a Bucket with its BucketSettings if it does not already exist with the default management timeout.
This method throws:
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.
settings - the bucket settings that should be applied.BucketSettings insertBucket(BucketSettings settings, long timeout, TimeUnit timeUnit)
Inserts a Bucket with its BucketSettings if it does not already exist with a custom timeout.
This method throws:
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.
settings - the bucket settings that should be applied.BucketSettings updateBucket(BucketSettings settings)
Updates a Bucket with its BucketSettings if it does already exist with the default management timeout.
This method throws:
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.
settings - the bucket settings that should be applied.BucketSettings updateBucket(BucketSettings settings, long timeout, TimeUnit timeUnit)
Updates a Bucket with its BucketSettings if it does already exist with a custom timeout.
This method throws:
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.
settings - the bucket settings that should be applied.timeout - the custom timeout.timeUnit - the time unit for the custom timeout.Boolean removeBucket(String name)
Removes a Bucket identified by its name with the default management timeout.
This method throws:
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.
name - the name of the bucket.Boolean removeBucket(String name, long timeout, TimeUnit timeUnit)
Removes a Bucket identified by its name with a custom timeout.
This method throws:
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.
name - the name of the bucket.timeout - the custom timeout.timeUnit - the time unit for the custom timeout.@InterfaceStability.Experimental Boolean upsertUser(AuthDomain domain, String username, UserSettings settings)
Creates/Updates a user with its UserSettings with default management timeout.
This method throws:
Note: Updating a user 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.
domain - the authentication to use, most likely AuthDomain.LOCALusername - the user name of the user to be updatedsettings - the user settings that should be applied.@InterfaceStability.Experimental Boolean upsertUser(AuthDomain domain, String username, UserSettings settings, long timeout, TimeUnit timeUnit)
Creates/Updates a user with its UserSettings with custom timeout.
This method throws:
Note: Updating a user 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.
domain - the authentication to use, most likely AuthDomain.LOCALusername - the user name of the user to be updated.settings - the user settings that should be applied.timeout - the custom timeout.timeUnit - the time unit for the custom timeout.@InterfaceStability.Experimental Boolean removeUser(AuthDomain domain, String username)
Removes a user identified by user name with the default management timeout.
This method throws:
Note: Removing a user 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.
domain - the authentication to use, most likely AuthDomain.LOCALusername - the user name of the user to be deleted.@InterfaceStability.Experimental Boolean removeUser(AuthDomain domain, String username, long timeout, TimeUnit timeUnit)
Removes a user identified by user name with a custom timeout.
This method throws:
Note: Removing a user 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.
domain - the authentication to use, most likely AuthDomain.LOCALusername - the user name of the user to be deleted.timeout - the custom timeout.timeUnit - the time unit for the custom timeout.@InterfaceStability.Experimental List<User> getUsers(AuthDomain domain)
Get all users in Couchbase with default management timeout.
This method throws:
@InterfaceStability.Experimental List<User> getUsers(AuthDomain domain, long timeout, TimeUnit timeUnit)
Get all users in Couchbase with a custom timeout.
This method throws:
domain - the authentication to use, most likely AuthDomain.LOCALtimeout - the custom timeout.timeUnit - the time unit for the custom timeout.@InterfaceStability.Experimental User getUser(AuthDomain domain, String userid)
Get user info in Couchbase with default management timeout.
This method throws:
@InterfaceStability.Experimental User getUser(AuthDomain domain, String userid, long timeout, TimeUnit timeUnit)
Get user info in Couchbase with custom timeout.
This method throws:
@InterfaceStability.Experimental ClusterApiClient apiClient()
Returns a new ClusterApiClient to prepare and perform REST API synchronous requests on this cluster. The requests have a default timeout corresponding to the configured CouchbaseEnvironment.managementTimeout().
ClusterApiClient.Copyright © 2015 Couchbase, Inc.