Class DefaultBucketSettings
- java.lang.Object
-
- com.couchbase.client.java.cluster.DefaultBucketSettings
-
- All Implemented Interfaces:
BucketSettings
public class DefaultBucketSettings extends Object implements BucketSettings
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultBucketSettings.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultBucketSettings.Builder
builder()
Provides a builder to build the bucket settings.CompressionMode
compressionMode()
The different compression modes for the bucket.static DefaultBucketSettings
create(String name)
Helper method to create bucket settings with a name and default settings.Map<String,Object>
customSettings()
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.EjectionMethod
ejectionMethod()
The ejection method available for the bucket.boolean
enableFlush()
If flush is enabled.boolean
indexReplicas()
If replicas are indexed.String
name()
The name of the bucket.String
password()
The password of the bucket.int
port()
The optional proxy port.int
quota()
The bucket quota.JsonObject
raw()
A raw representation of the bucket settings when acquired from the server.int
replicas()
Number of replicas.String
toString()
BucketType
type()
The type of the bucket.
-
-
-
Method Detail
-
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 interfaceBucketSettings
- Returns:
- name of the bucket.
-
type
public BucketType type()
Description copied from interface:BucketSettings
The type of the bucket.- Specified by:
type
in interfaceBucketSettings
- Returns:
- type of the bucket.
-
quota
public int quota()
Description copied from interface:BucketSettings
The bucket quota.- Specified by:
quota
in interfaceBucketSettings
- Returns:
- bucket quota.
-
port
public int port()
Description copied from interface:BucketSettings
The optional proxy port.- Specified by:
port
in interfaceBucketSettings
- Returns:
- proxy port.
-
password
public String password()
Description copied from interface:BucketSettings
The password of the bucket.- Specified by:
password
in interfaceBucketSettings
- Returns:
- password.
-
replicas
public int replicas()
Description copied from interface:BucketSettings
Number of replicas.- Specified by:
replicas
in interfaceBucketSettings
- Returns:
- number of replicas.
-
indexReplicas
public boolean indexReplicas()
Description copied from interface:BucketSettings
If replicas are indexed.- Specified by:
indexReplicas
in interfaceBucketSettings
- Returns:
- indexing replicas.
-
enableFlush
public boolean enableFlush()
Description copied from interface:BucketSettings
If flush is enabled.- Specified by:
enableFlush
in interfaceBucketSettings
- Returns:
- flush enabled.
-
compressionMode
public CompressionMode compressionMode()
Description copied from interface:BucketSettings
The different compression modes for the bucket.- Specified by:
compressionMode
in interfaceBucketSettings
- 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 interfaceBucketSettings
- 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, seeBucketSettings.raw()
instead.- Specified by:
customSettings
in interfaceBucketSettings
- 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 seeBucketSettings.customSettings()
.- Specified by:
raw
in interfaceBucketSettings
- Returns:
- the raw representation of the whole bucket settings, as returned by the server, or
an empty
JsonObject
if not applicable.
-
-