public enum CodecFlags extends Enum<CodecFlags>
Modifier and Type | Class and Description |
---|---|
static class |
CodecFlags.CommonFlags
The common flags enum.
|
Modifier and Type | Field and Description |
---|---|
static int |
BINARY_COMMON_FLAGS |
static int |
BINARY_COMPAT_FLAGS |
static int |
BINARY_LEGACY_FLAGS |
static int |
BOOLEAN_COMPAT_FLAGS |
static int |
BOOLEAN_LEGACY_FLAGS |
static int |
COMMON_FORMAT_MASK
32bit flag is composed of:
- 3 compression bits
- 1 bit reserved for future use
- 4 format flags bits.
|
static int |
DOUBLE_COMPAT_FLAGS |
static int |
DOUBLE_LEGACY_FLAGS |
static int |
JSON_COMMON_FLAGS |
static int |
JSON_COMPAT_FLAGS |
static int |
JSON_LEGACY_FLAGS |
static int |
LONG_COMPAT_FLAGS |
static int |
LONG_LEGACY_FLAGS |
static int |
PRIVATE_COMMON_FLAGS |
static int |
SERIALIZED_COMPAT_FLAGS |
static int |
SERIALIZED_LEGACY_FLAGS |
static int |
STRING_COMMON_FLAGS |
static int |
STRING_COMPAT_FLAGS |
static int |
STRING_LEGACY_FLAGS |
Modifier and Type | Method and Description |
---|---|
static int |
createCommonFlags(int flags)
Takes a integer representation of flags and moves them to the common flags MSBs.
|
static int |
extractCommonFlags(int flags)
Returns only the common flags from the full flags.
|
static boolean |
hasCommonFlags(int flags)
Checks whether the upper 8 bits are set, indicating common flags presence.
|
static boolean |
hasCommonFormat(int flags,
int expectedCommonFlag)
Checks that flags has common flags bits set and that they correspond to expected common flags format.
|
static boolean |
hasCompressionFlags(int flags)
Checks whether the upper 3 bits are set, indicating compression presence.
|
static CodecFlags |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CodecFlags[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final int COMMON_FORMAT_MASK
public static final int PRIVATE_COMMON_FLAGS
public static final int JSON_COMMON_FLAGS
public static final int BINARY_COMMON_FLAGS
public static final int STRING_COMMON_FLAGS
public static final int SERIALIZED_LEGACY_FLAGS
public static final int BINARY_LEGACY_FLAGS
public static final int STRING_LEGACY_FLAGS
public static final int JSON_LEGACY_FLAGS
public static final int BOOLEAN_LEGACY_FLAGS
public static final int LONG_LEGACY_FLAGS
public static final int DOUBLE_LEGACY_FLAGS
public static final int SERIALIZED_COMPAT_FLAGS
public static final int JSON_COMPAT_FLAGS
public static final int BINARY_COMPAT_FLAGS
public static final int BOOLEAN_COMPAT_FLAGS
public static final int LONG_COMPAT_FLAGS
public static final int DOUBLE_COMPAT_FLAGS
public static final int STRING_COMPAT_FLAGS
public static CodecFlags[] values()
for (CodecFlags c : CodecFlags.values()) System.out.println(c);
public static CodecFlags valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic static int createCommonFlags(int flags)
flags
- the flags to shift.public static boolean hasCommonFlags(int flags)
flags
- the flags to check.public static boolean hasCommonFormat(int flags, int expectedCommonFlag)
flags
- the 32 bits flags to checkexpectedCommonFlag
- the expected common flags format bitspublic static int extractCommonFlags(int flags)
flags
- the flags to check.public static boolean hasCompressionFlags(int flags)
flags
- the flags to check.Copyright © 2020 Couchbase, Inc.. All rights reserved.