Class BucketSettings

java.lang.Object
com.couchbase.client.java.manager.bucket.BucketSettings

public class BucketSettings
extends Object
  • Constructor Details

  • Method Details

    • create

      public static BucketSettings create​(String name)
    • name

      public String name()
    • flushEnabled

      public boolean flushEnabled()
    • ramQuotaMB

      public long ramQuotaMB()
    • numReplicas

      public int numReplicas()
    • replicaIndexes

      public boolean replicaIndexes()
    • minimumDurabilityLevel

      public DurabilityLevel minimumDurabilityLevel()
      Returns the minimum durability level set for the bucket. Note that if the bucket does not support it, and by default, it is set to DurabilityLevel.NONE.
      Returns:
      the minimum durability level for that bucket.
    • maxTTL

      @Deprecated public int maxTTL()
      Deprecated.
      please use maxExpiry() instead.
      Returns the maximum expiry (time-to-live) for all documents in the bucket in seconds.
    • maxExpiry

      public Duration maxExpiry()
      Returns the maximum expiry (time-to-live) for all documents in the bucket.
    • compressionMode

      public CompressionMode compressionMode()
    • bucketType

      public BucketType bucketType()
    • conflictResolutionType

      public ConflictResolutionType conflictResolutionType()
    • ejectionPolicy

      @Deprecated public EjectionPolicy ejectionPolicy()
      Deprecated.
      Please use evictionPolicy instead.
    • evictionPolicy

      public EvictionPolicyType evictionPolicy()
    • flushEnabled

      public BucketSettings flushEnabled​(boolean flushEnabled)
    • ramQuotaMB

      public BucketSettings ramQuotaMB​(long ramQuotaMB)
    • numReplicas

      public BucketSettings numReplicas​(int numReplicas)
    • replicaIndexes

      public BucketSettings replicaIndexes​(boolean replicaIndexes)
    • maxTTL

      @Deprecated public BucketSettings maxTTL​(int maxTTL)
      Deprecated.
      please use maxExpiry(Duration) instead.
      Specifies the maximum expiry (time-to-live) for all documents in the bucket in seconds.
      Parameters:
      maxTTL - the maximum expiry in seconds.
      Returns:
      this BucketSettings for chaining purposes.
    • maxExpiry

      public BucketSettings maxExpiry​(Duration maxExpiry)
      Specifies the maximum expiry (time-to-live) for all documents in the bucket.
      Parameters:
      maxExpiry - the maximum expiry.
      Returns:
      this BucketSettings for chaining purposes.
    • compressionMode

      public BucketSettings compressionMode​(CompressionMode compressionMode)
    • bucketType

      public BucketSettings bucketType​(BucketType bucketType)
    • conflictResolutionType

      public BucketSettings conflictResolutionType​(ConflictResolutionType conflictResolutionType)
    • ejectionPolicy

      @Deprecated public BucketSettings ejectionPolicy​(EjectionPolicy ejectionPolicy)
      Deprecated.
      Please use evictionPolicy instead.
      Parameters:
      ejectionPolicy - (nullable) policy to use, or null for default policy for the bucket type.
    • evictionPolicy

      public BucketSettings evictionPolicy​(EvictionPolicyType evictionPolicy)
      Parameters:
      evictionPolicy - (nullable) policy to use, or null for default policy for the bucket type.
    • minimumDurabilityLevel

      public BucketSettings minimumDurabilityLevel​(DurabilityLevel durabilityLevel)
      Allows to provide a custom minimum DurabilityLevel for this bucket.
      Parameters:
      durabilityLevel - the minimum level to use for all KV operations.
      Returns:
      this BucketSettings object for chainability.
    • healthy

      @Internal public boolean healthy()
    • toString

      public String toString()
      Overrides:
      toString in class Object