Package com.couchbase.client.core.config
Class DefaultClusterConfig
java.lang.Object
com.couchbase.client.core.config.DefaultClusterConfig
- All Implemented Interfaces:
ClusterConfig
Default implementation of a
ClusterConfig
.- Since:
- 1.0
- Author:
- Michael Nitschinger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the addresses of all nodes in the cluster, accumulated from all open buckets.bucketConfig
(String bucketName) Returns theBucketConfig
for the given bucket name.void
deleteBucketConfig
(String bucketName) boolean
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.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
-