Package com.couchbase.client.core.config
Class DefaultClusterConfig
java.lang.Object
com.couchbase.client.core.config.DefaultClusterConfig
- All Implemented Interfaces:
ClusterConfig
public class DefaultClusterConfig extends Object implements ClusterConfig
Default implementation of a
ClusterConfig
.- Since:
- 1.0
- Author:
- Michael Nitschinger
-
Constructor Summary
Constructors Constructor Description DefaultClusterConfig()
Creates a newDefaultClusterConfig
. -
Method Summary
Modifier and Type Method Description Set<String>
allNodeAddresses()
Returns the addresses of all nodes in the cluster, accumulated from all open buckets.BucketConfig
bucketConfig(String bucketName)
Returns theBucketConfig
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()
-
Constructor Details
-
DefaultClusterConfig
public DefaultClusterConfig()Creates a newDefaultClusterConfig
.
-
-
Method Details
-
bucketConfig
Description copied from interface:ClusterConfig
Returns theBucketConfig
for the given bucket name.- Specified by:
bucketConfig
in interfaceClusterConfig
- Parameters:
bucketName
- name of the bucket.- Returns:
- a config, if set.
-
setBucketConfig
Description copied from interface:ClusterConfig
Set a bucket config for the given bucket name.- Specified by:
setBucketConfig
in interfaceClusterConfig
- Parameters:
bucketName
- the name of the bucket.config
- the configuration associated with the bucket.
-
deleteBucketConfig
- Specified by:
deleteBucketConfig
in interfaceClusterConfig
-
hasBucket
Description copied from interface:ClusterConfig
True if there is a bucket config with the given name, false otherwise.- Specified by:
hasBucket
in interfaceClusterConfig
- Parameters:
bucketName
- name of the bucket.- Returns:
- true if bucket is there.
-
bucketConfigs
- Specified by:
bucketConfigs
in interfaceClusterConfig
-
allNodeAddresses
Description copied from interface:ClusterConfig
Returns the addresses of all nodes in the cluster, accumulated from all open buckets.- Specified by:
allNodeAddresses
in interfaceClusterConfig
-
toString
-