Class DcpControl

java.lang.Object
com.couchbase.client.dcp.config.DcpControl

public class DcpControl extends Object
This class is used during bootstrap to configure all the possible DCP negotiation parameters.
  • Constructor Details

    • DcpControl

      public DcpControl()
  • Method Details

    • compression

      public void compression(CompressionMode compressionMode)
      Set the compression mode to use. If not specified, defaults to CompressionMode.DISABLED.
    • compression

      public CompressionMode compression(Version version)
      Returns the requested compression mode, or the fallback mode if the server does not support the requested mode.
    • put

      public DcpControl put(DcpControl.Names name, String value)
      Sets a control parameter.
      Parameters:
      name - the name of the control parameter.
      value - the stringified version what it should be set to.
      Returns:
      the DcpControl instance for chainability.
    • put

      public DcpControl put(String name, String value)
    • putOptional

      public DcpControl putOptional(String name, String value)
    • get

      public String get(DcpControl.Names name)
      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

      public List<Control> getControls(Version serverVersion)
      Returns the control settings, adjusted for the actual Couchbase Server version.
    • toString

      public String toString()
      Overrides:
      toString in class Object