Package com.couchbase.client.core.config
Class ClusterConfig
- java.lang.Object
-
- com.couchbase.client.core.config.ClusterConfig
-
public class ClusterConfig extends Object
TheClusterConfigholds bucket and global configurations in a central place.
-
-
Constructor Summary
Constructors Constructor Description ClusterConfig()Creates a newClusterConfig.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<String>allNodeAddresses()Dynamically aggregates all node addresses from global and bucket configs into a set (no duplicates).BucketConfigbucketConfig(String bucketName)Map<String,BucketConfig>bucketConfigs()Map<ServiceType,Set<ClusterCapabilities>>clusterCapabilities()Returns the current cluster capabilities.voiddeleteBucketConfig(String bucketName)voiddeleteGlobalConfig()GlobalConfigglobalConfig()booleanhasClusterOrBucketConfig()voidsetBucketConfig(BucketConfig config)voidsetGlobalConfig(GlobalConfig config)StringtoString()
-
-
-
Constructor Detail
-
ClusterConfig
public ClusterConfig()
Creates a newClusterConfig.
-
-
Method Detail
-
bucketConfig
public BucketConfig bucketConfig(String bucketName)
-
setBucketConfig
@Internal public void setBucketConfig(BucketConfig config)
-
bucketConfigs
public Map<String,BucketConfig> bucketConfigs()
-
globalConfig
public GlobalConfig globalConfig()
-
setGlobalConfig
@Internal public void setGlobalConfig(GlobalConfig config)
-
deleteGlobalConfig
@Internal public void deleteGlobalConfig()
-
hasClusterOrBucketConfig
public boolean hasClusterOrBucketConfig()
-
allNodeAddresses
public Set<String> allNodeAddresses()
Dynamically aggregates all node addresses from global and bucket configs into a set (no duplicates).- Returns:
- all node addresses found in global and bucket configs without duplicates.
-
clusterCapabilities
public Map<ServiceType,Set<ClusterCapabilities>> clusterCapabilities()
Returns the current cluster capabilities.Right now this needs at least one bucket open, and it grabs the capabilities from the first bucket config available. If needed, in the future this can be made more intelligent (caching?).
-
-