@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 |
---|---|
AsyncClusterManager |
async()
Accesses the underlying
AsyncClusterManager to perform asynchronous operations on the cluster. |
BucketSettings |
getBucket(java.lang.String name)
Returns the
BucketSettings for the Bucket identified by name with the default management timeout. |
BucketSettings |
getBucket(java.lang.String name,
long timeout,
java.util.concurrent.TimeUnit timeUnit)
Returns the
BucketSettings for the Bucket identified by name with a custom timeout. |
java.util.List<BucketSettings> |
getBuckets()
Returns a list of
BucketSettings for all available Bucket s with the default management timeout. |
java.util.List<BucketSettings> |
getBuckets(long timeout,
java.util.concurrent.TimeUnit timeUnit)
Returns a list of
BucketSettings for all available Bucket s with a custom timeout. |
java.lang.Boolean |
hasBucket(java.lang.String name)
Checks if the cluster has a
Bucket identified by the given name with the default management timeout. |
java.lang.Boolean |
hasBucket(java.lang.String name,
long timeout,
java.util.concurrent.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,
java.util.concurrent.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,
java.util.concurrent.TimeUnit timeUnit)
Inserts a
Bucket with its BucketSettings if it does not already exist with a custom timeout. |
java.lang.Boolean |
removeBucket(java.lang.String name)
Removes a
Bucket identified by its name with the default management timeout. |
java.lang.Boolean |
removeBucket(java.lang.String name,
long timeout,
java.util.concurrent.TimeUnit timeUnit)
Removes a
Bucket identified by its 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,
java.util.concurrent.TimeUnit timeUnit)
Updates a
Bucket with its BucketSettings if it does already exist with a 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, java.util.concurrent.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.java.util.List<BucketSettings> getBuckets()
Returns a list of BucketSettings
for all available Bucket
s with the default management timeout.
This method throws:
BucketSettings
.java.util.List<BucketSettings> getBuckets(long timeout, java.util.concurrent.TimeUnit timeUnit)
Returns a list of BucketSettings
for all available Bucket
s with a custom timeout.
This method throws:
timeout
- the custom timeout.timeUnit
- the time unit for the custom timeout.BucketSettings
.BucketSettings getBucket(java.lang.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(java.lang.String name, long timeout, java.util.concurrent.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.java.lang.Boolean hasBucket(java.lang.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.java.lang.Boolean hasBucket(java.lang.String name, long timeout, java.util.concurrent.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:
settings
- the bucket settings that should be applied.BucketSettings insertBucket(BucketSettings settings, long timeout, java.util.concurrent.TimeUnit timeUnit)
Inserts a Bucket
with its BucketSettings
if it does not already exist with a custom timeout.
This method throws:
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:
settings
- the bucket settings that should be applied.BucketSettings updateBucket(BucketSettings settings, long timeout, java.util.concurrent.TimeUnit timeUnit)
Updates a Bucket
with its BucketSettings
if it does already exist with a custom timeout.
This method throws:
settings
- the bucket settings that should be applied.timeout
- the custom timeout.timeUnit
- the time unit for the custom timeout.java.lang.Boolean removeBucket(java.lang.String name)
Removes a Bucket
identified by its name with the default management timeout.
This method throws:
name
- the name of the bucket.java.lang.Boolean removeBucket(java.lang.String name, long timeout, java.util.concurrent.TimeUnit timeUnit)
Removes a Bucket
identified by its 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.