Class BucketSettings
- java.lang.Object
-
- com.couchbase.client.java.manager.bucket.BucketSettings
-
public class BucketSettings extends Object
-
-
Constructor Summary
Constructors Constructor Description BucketSettings(String name, Map<String,String> controllers, Map<String,Long> quota, int numReplicas, boolean replicaIndex, int maxTTL, CompressionMode compressionMode, BucketType bucketType, ConflictResolutionType conflictResolutionType, EvictionPolicyType evictionPolicy)
-
Method Summary
-
-
-
Constructor Detail
-
BucketSettings
public BucketSettings(String name, Map<String,String> controllers, Map<String,Long> quota, int numReplicas, boolean replicaIndex, int maxTTL, CompressionMode compressionMode, BucketType bucketType, ConflictResolutionType conflictResolutionType, EvictionPolicyType evictionPolicy)
-
-
Method Detail
-
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()
-
maxTTL
@Deprecated public int maxTTL()
Deprecated.please usemaxExpiry()
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 useevictionPolicy
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 usemaxExpiry(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 useevictionPolicy
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.
-
healthy
@Internal public boolean healthy()
-
-