Package com.couchbase.client.dcp.config
Class DcpControl
java.lang.Object
com.couchbase.client.dcp.config.DcpControl
This class is used during bootstrap to configure all the possible DCP negotiation parameters.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumAll the possible control options available. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanShorthand getter to check if buffer acknowledgements are enabled.voidcompression(CompressionMode compressionMode) Set the compression mode to use.compression(Version version) Returns the requested compression mode, or the fallback mode if the server does not support the requested mode.get(DcpControl.Names name) Returns a param if set, otherwise null is returned.getControls(Version serverVersion) Returns the control settings, adjusted for the actual Couchbase Server version.booleanShorthand getter to check if noops are enabled.intShorthand getter for the NOOP interval.put(DcpControl.Names name, String value) Sets a control parameter.toString()
-
Constructor Details
-
DcpControl
public DcpControl()
-
-
Method Details
-
compression
Set the compression mode to use. If not specified, defaults toCompressionMode.DISABLED. -
compression
Returns the requested compression mode, or the fallback mode if the server does not support the requested mode. -
put
Sets a control parameter.- Parameters:
name- the name of the control parameter.value- the stringified version what it should be set to.- Returns:
- the
DcpControlinstance for chainability.
-
put
-
get
Returns a param if set, otherwise null is returned.- Parameters:
name- the name of the param.- Returns:
- the stringified value if set, null otherwise.
-
bufferAckEnabled
public boolean bufferAckEnabled()Shorthand getter to check if buffer acknowledgements are enabled. -
noopEnabled
public boolean noopEnabled()Shorthand getter to check if noops are enabled. -
noopIntervalSeconds
public int noopIntervalSeconds()Shorthand getter for the NOOP interval. -
getControls
Returns the control settings, adjusted for the actual Couchbase Server version. -
toString
-