Class DefaultBucketSettings

java.lang.Object
com.couchbase.client.java.cluster.DefaultBucketSettings
All Implemented Interfaces:
BucketSettings

public class DefaultBucketSettings
extends Object
implements BucketSettings
  • Method Details

    • builder

      public static DefaultBucketSettings.Builder builder()
      Provides a builder to build the bucket settings.
      Returns:
      the bucket settings builder.
    • create

      public static DefaultBucketSettings create​(String name)
      Helper method to create bucket settings with a name and default settings.
      Parameters:
      name - the name of the bucket
      Returns:
      bucket settings with defaults.
    • name

      public String name()
      Description copied from interface: BucketSettings
      The name of the bucket.
      Specified by:
      name in interface BucketSettings
      Returns:
      name of the bucket.
    • type

      public BucketType type()
      Description copied from interface: BucketSettings
      The type of the bucket.
      Specified by:
      type in interface BucketSettings
      Returns:
      type of the bucket.
    • quota

      public int quota()
      Description copied from interface: BucketSettings
      The bucket quota.
      Specified by:
      quota in interface BucketSettings
      Returns:
      bucket quota.
    • port

      public int port()
      Description copied from interface: BucketSettings
      The optional proxy port.
      Specified by:
      port in interface BucketSettings
      Returns:
      proxy port.
    • password

      public String password()
      Description copied from interface: BucketSettings
      The password of the bucket.
      Specified by:
      password in interface BucketSettings
      Returns:
      password.
    • replicas

      public int replicas()
      Description copied from interface: BucketSettings
      Number of replicas.
      Specified by:
      replicas in interface BucketSettings
      Returns:
      number of replicas.
    • indexReplicas

      public boolean indexReplicas()
      Description copied from interface: BucketSettings
      If replicas are indexed.
      Specified by:
      indexReplicas in interface BucketSettings
      Returns:
      indexing replicas.
    • enableFlush

      public boolean enableFlush()
      Description copied from interface: BucketSettings
      If flush is enabled.
      Specified by:
      enableFlush in interface BucketSettings
      Returns:
      flush enabled.
    • compressionMode

      public CompressionMode compressionMode()
      Description copied from interface: BucketSettings
      The different compression modes for the bucket.
      Specified by:
      compressionMode in interface BucketSettings
      Returns:
      the compression mode selected.
    • ejectionMethod

      public EjectionMethod ejectionMethod()
      Description copied from interface: BucketSettings
      The ejection method available for the bucket.
      Specified by:
      ejectionMethod in interface BucketSettings
      Returns:
      the ejection method selected.
    • customSettings

      public Map<String,​Object> customSettings()
      Description copied from interface: BucketSettings
      A map of map of advanced settings that are not covered by the native methods of the object but still need to be set when configuring a bucket. To get a full raw representation of an existing bucket's configuration, see BucketSettings.raw() instead.
      Specified by:
      customSettings in interface BucketSettings
      Returns:
      the map of custom advanced settings to use when configuring the bucket.
    • raw

      public JsonObject raw()
      Description copied from interface: BucketSettings
      A raw representation of the bucket settings when acquired from the server. This can be used to get any missing information about the bucket that isn't covered by native methods. To configure a bucket and add settings that are not covered by native methods either, you should instead see BucketSettings.customSettings().
      Specified by:
      raw in interface BucketSettings
      Returns:
      the raw representation of the whole bucket settings, as returned by the server, or an empty JsonObject if not applicable.
    • toString

      public String toString()
      Overrides:
      toString in class Object