Package com.couchbase.client.core.config
Class ClusterConfig
- java.lang.Object
-
- com.couchbase.client.core.config.ClusterConfig
-
public class ClusterConfig extends Object
TheClusterConfig
holds 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).BucketConfig
bucketConfig(String bucketName)
Map<String,BucketConfig>
bucketConfigs()
Map<ServiceType,Set<ClusterCapabilities>>
clusterCapabilities()
Returns the current cluster capabilities.void
deleteBucketConfig(String bucketName)
void
deleteGlobalConfig()
GlobalConfig
globalConfig()
boolean
hasClusterOrBucketConfig()
void
setBucketConfig(BucketConfig config)
void
setGlobalConfig(GlobalConfig config)
String
toString()
-
-
-
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?).
-
-