public class DefaultClusterConfig extends Object implements ClusterConfig
Default implementation of a ClusterConfig
.
Constructor and Description |
---|
DefaultClusterConfig()
Creates a new
DefaultClusterConfig . |
Modifier and Type | Method and Description |
---|---|
Set<NetworkAddress> |
allNodeAddresses()
Returns the addresses of all nodes in the cluster, accumulated from all open buckets.
|
BucketConfig |
bucketConfig(String bucketName)
Returns the
BucketConfig for the given bucket name. |
Map<String,BucketConfig> |
bucketConfigs() |
void |
deleteBucketConfig(String bucketName) |
boolean |
hasBucket(String bucketName)
True if there is a bucket config with the given name, false otherwise.
|
void |
setBucketConfig(String bucketName,
BucketConfig config)
Set a bucket config for the given bucket name.
|
String |
toString() |
public DefaultClusterConfig()
Creates a new DefaultClusterConfig
.
public BucketConfig bucketConfig(String bucketName)
ClusterConfig
Returns the BucketConfig
for the given bucket name.
bucketConfig
in interface ClusterConfig
bucketName
- name of the bucket.public void setBucketConfig(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(String bucketName)
deleteBucketConfig
in interface ClusterConfig
public boolean hasBucket(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 Map<String,BucketConfig> bucketConfigs()
bucketConfigs
in interface ClusterConfig
public Set<NetworkAddress> allNodeAddresses()
ClusterConfig
Returns the addresses of all nodes in the cluster, accumulated from all open buckets.
allNodeAddresses
in interface ClusterConfig
Copyright © 2018 Couchbase, Inc.. All rights reserved.