public class DcpControl extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
DcpControl.Names
All the possible control options available.
|
| Constructor and Description |
|---|
DcpControl()
Creates a new
DcpControl instance with no params set upfront. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
bufferAckEnabled()
Shorthand getter to check if buffer acknowledgements are enabled.
|
void |
compression(CompressionMode compressionMode)
Set the compression mode to use.
|
CompressionMode |
compression(Version version)
Returns the requested compression mode, or the fallback mode if the
server does not support the requested mode.
|
String |
get(DcpControl.Names name)
Returns a param if set, otherwise null is returned.
|
Map<String,String> |
getControls(Version serverVersion)
Returns the control settings, adjusted for the actual Couchbase Server version.
|
boolean |
noopEnabled()
Shorthand getter to check if noops are enabled.
|
int |
noopIntervalSeconds()
Shorthand getter for the NOOP interval.
|
DcpControl |
put(DcpControl.Names name,
String value)
Store/Override a control parameter.
|
String |
toString() |
public DcpControl()
DcpControl instance with no params set upfront.public void compression(CompressionMode compressionMode)
CompressionMode.DISABLED.public CompressionMode compression(Version version)
public DcpControl put(DcpControl.Names name, String value)
name - the name of the control parameter.value - the stringified version what it should be set to.DcpControl instance for chainability.public String get(DcpControl.Names name)
name - the name of the param.public boolean bufferAckEnabled()
public boolean noopEnabled()
public int noopIntervalSeconds()
public Map<String,String> getControls(Version serverVersion)
Copyright © 2021 Couchbase, Inc.. All rights reserved.