Class ClusterConfig

java.lang.Object
com.couchbase.client.core.config.ClusterConfig

public class ClusterConfig extends Object
The ClusterConfig holds bucket and global configurations in a central place.
  • Constructor Details

    • ClusterConfig

      public ClusterConfig()
      Creates a new ClusterConfig.
  • Method Details

    • bucketConfig

      public BucketConfig bucketConfig(String bucketName)
    • setBucketConfig

      @Internal public void setBucketConfig(BucketConfig config)
    • deleteBucketConfig

      @Internal public void deleteBucketConfig(String bucketName)
    • 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.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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?).