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 classDefaultBucketSettings.Builder -
Method Summary
Modifier and Type Method Description static DefaultBucketSettings.Builderbuilder()Provides a builder to build the bucket settings.CompressionModecompressionMode()The different compression modes for the bucket.static DefaultBucketSettingscreate(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.EjectionMethodejectionMethod()The ejection method available for the bucket.booleanenableFlush()If flush is enabled.booleanindexReplicas()If replicas are indexed.Stringname()The name of the bucket.Stringpassword()The password of the bucket.intport()The optional proxy port.intquota()The bucket quota.JsonObjectraw()A raw representation of the bucket settings when acquired from the server.intreplicas()Number of replicas.StringtoString()BucketTypetype()The type of the bucket.
-
Method Details
-
builder
Provides a builder to build the bucket settings.- Returns:
- the bucket settings builder.
-
create
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
Description copied from interface:BucketSettingsThe name of the bucket.- Specified by:
namein interfaceBucketSettings- Returns:
- name of the bucket.
-
type
Description copied from interface:BucketSettingsThe type of the bucket.- Specified by:
typein interfaceBucketSettings- Returns:
- type of the bucket.
-
quota
public int quota()Description copied from interface:BucketSettingsThe bucket quota.- Specified by:
quotain interfaceBucketSettings- Returns:
- bucket quota.
-
port
public int port()Description copied from interface:BucketSettingsThe optional proxy port.- Specified by:
portin interfaceBucketSettings- Returns:
- proxy port.
-
password
Description copied from interface:BucketSettingsThe password of the bucket.- Specified by:
passwordin interfaceBucketSettings- Returns:
- password.
-
replicas
public int replicas()Description copied from interface:BucketSettingsNumber of replicas.- Specified by:
replicasin interfaceBucketSettings- Returns:
- number of replicas.
-
indexReplicas
public boolean indexReplicas()Description copied from interface:BucketSettingsIf replicas are indexed.- Specified by:
indexReplicasin interfaceBucketSettings- Returns:
- indexing replicas.
-
enableFlush
public boolean enableFlush()Description copied from interface:BucketSettingsIf flush is enabled.- Specified by:
enableFlushin interfaceBucketSettings- Returns:
- flush enabled.
-
compressionMode
Description copied from interface:BucketSettingsThe different compression modes for the bucket.- Specified by:
compressionModein interfaceBucketSettings- Returns:
- the compression mode selected.
-
ejectionMethod
Description copied from interface:BucketSettingsThe ejection method available for the bucket.- Specified by:
ejectionMethodin interfaceBucketSettings- Returns:
- the ejection method selected.
-
customSettings
Description copied from interface:BucketSettingsA 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:
customSettingsin interfaceBucketSettings- Returns:
- the map of custom advanced settings to use when configuring the bucket.
-
raw
Description copied from interface:BucketSettingsA 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:
rawin interfaceBucketSettings- Returns:
- the raw representation of the whole bucket settings, as returned by the server, or
an empty
JsonObjectif not applicable.
-
toString
-