public static class DefaultBucketSettings.Builder extends Object implements BucketSettings
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
DefaultBucketSettings |
build() |
DefaultBucketSettings |
build(JsonObject raw)
Build the
BucketSettings from the data aggregated by this builder, and set its BucketSettings.raw() representation as well. |
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.
|
boolean |
enableFlush()
If flush is enabled.
|
DefaultBucketSettings.Builder |
enableFlush(boolean enableFlush) |
boolean |
indexReplicas()
If replicas are indexed.
|
DefaultBucketSettings.Builder |
indexReplicas(boolean indexReplicas) |
String |
name()
The name of the bucket.
|
DefaultBucketSettings.Builder |
name(String name) |
String |
password()
The password of the bucket.
|
DefaultBucketSettings.Builder |
password(String password) |
int |
port()
The optional proxy port.
|
DefaultBucketSettings.Builder |
port(int port) |
int |
quota()
The bucket quota.
|
DefaultBucketSettings.Builder |
quota(int quota) |
JsonObject |
raw()
A raw representation of the bucket settings when acquired from the server.
|
int |
replicas()
Number of replicas.
|
DefaultBucketSettings.Builder |
replicas(int replicas) |
BucketType |
type()
The type of the bucket.
|
DefaultBucketSettings.Builder |
type(BucketType type) |
DefaultBucketSettings.Builder |
withSetting(String key,
Object value)
Add a custom setting to the bucket settings (ie.
|
DefaultBucketSettings.Builder |
withSettings(Map<String,Object> customSettings)
Add several custom settings to the bucket settings (ie.
|
public String name()
BucketSettings
The name of the bucket.
name
in interface BucketSettings
public DefaultBucketSettings.Builder name(String name)
public BucketType type()
BucketSettings
The type of the bucket.
type
in interface BucketSettings
public DefaultBucketSettings.Builder type(BucketType type)
public int quota()
BucketSettings
The bucket quota.
quota
in interface BucketSettings
public DefaultBucketSettings.Builder quota(int quota)
public int port()
BucketSettings
The optional proxy port.
port
in interface BucketSettings
public DefaultBucketSettings.Builder port(int port)
public String password()
BucketSettings
The password of the bucket.
password
in interface BucketSettings
public DefaultBucketSettings.Builder password(String password)
public int replicas()
BucketSettings
Number of replicas.
replicas
in interface BucketSettings
public DefaultBucketSettings.Builder replicas(int replicas)
public boolean indexReplicas()
BucketSettings
If replicas are indexed.
indexReplicas
in interface BucketSettings
public DefaultBucketSettings.Builder indexReplicas(boolean indexReplicas)
public boolean enableFlush()
BucketSettings
If flush is enabled.
enableFlush
in interface BucketSettings
public DefaultBucketSettings.Builder enableFlush(boolean enableFlush)
public Map<String,Object> customSettings()
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.
customSettings
in interface BucketSettings
public JsonObject raw()
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()
.
raw
in interface BucketSettings
JsonObject
if not applicable.public DefaultBucketSettings.Builder withSetting(String key, Object value)
Add a custom setting to the bucket settings (ie. one that is not covered by a native method).
key
- the setting’s key.value
- the setting’s value.public DefaultBucketSettings.Builder withSettings(Map<String,Object> customSettings)
Add several custom settings to the bucket settings (ie. settings not covered by a native method).
customSettings
- the settings to add.public DefaultBucketSettings build()
public DefaultBucketSettings build(JsonObject raw)
Build the BucketSettings
from the data aggregated by this builder, and set its BucketSettings.raw()
representation as well.
raw
- the raw representation for the settings, from the server.BucketSettings
.Copyright © 2015 Couchbase, Inc.