public class DefaultClusterConfig extends java.lang.Object implements ClusterConfig
Default implementation of a ClusterConfig
.
Constructor and Description |
---|
DefaultClusterConfig()
Creates a new
DefaultClusterConfig . |
Modifier and Type | Method and Description |
---|---|
BucketConfig |
bucketConfig(java.lang.String bucketName)
Returns the
BucketConfig for the given bucket name. |
java.util.Map<java.lang.String,BucketConfig> |
bucketConfigs() |
void |
deleteBucketConfig(java.lang.String bucketName) |
boolean |
hasBucket(java.lang.String bucketName)
True if there is a bucket config with the given name, false otherwise.
|
void |
setBucketConfig(java.lang.String bucketName,
BucketConfig config)
Set a bucket config for the given bucket name.
|
public DefaultClusterConfig()
Creates a new DefaultClusterConfig
.
public BucketConfig bucketConfig(java.lang.String bucketName)
ClusterConfig
Returns the BucketConfig
for the given bucket name.
bucketConfig
in interface ClusterConfig
bucketName
- name of the bucket.public void setBucketConfig(java.lang.String bucketName, BucketConfig config)
ClusterConfig
Set a bucket config for the given bucket name.
setBucketConfig
in interface ClusterConfig
bucketName
- the name of the bucket.config
- the configuration associated with the bucket.public void deleteBucketConfig(java.lang.String bucketName)
deleteBucketConfig
in interface ClusterConfig
public boolean hasBucket(java.lang.String bucketName)
ClusterConfig
True if there is a bucket config with the given name, false otherwise.
hasBucket
in interface ClusterConfig
bucketName
- name of the bucket.public java.util.Map<java.lang.String,BucketConfig> bucketConfigs()
bucketConfigs
in interface ClusterConfig