Package com.couchbase.client.dcp.config
Enum Class CompressionMode
- All Implemented Interfaces:
Serializable,Comparable<CompressionMode>,java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionabstract CompressionModeeffectiveMode(Version serverVersion) getDcpControls(Version serverVersion) getHelloFeatures(Version serverVersion) static CompressionModeReturns the enum constant of this class with the specified name.static CompressionMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DISABLED
Couchbase Server will never send compressed values. -
FORCED
Couchbase Server will always send compressed values, regardless of how the values are stored on the server, unless the compressed form is larger than the uncompressed form.When connecting to a server older than version 5.5, this mode will be downgraded to DISABLED.
- Since:
- Couchbase Server 5.5 (Vulcan)
-
ENABLED
Default mode.Couchbase Server may send compressed values at its discretion. Values stored in compressed form will be sent compressed. Values stored in uncompressed form will be sent uncompressed.
When connecting to a server older than version 5.5, this mode will be downgraded to DISABLED.
- Since:
- Couchbase Server 5.5 (Vulcan)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
effectiveMode
- Returns:
- the mode specified by this enum value, or the fallback mode as required by the actual server version.
-
getDcpControls
- Returns:
- the controls required to activate this compression mode.
-
getHelloFeatures
- Returns:
- the HELLO features required to activate this compression mode.
-