public static enum TableOption.CompressionOption extends Enum<TableOption.CompressionOption> implements Option
| Enum Constant and Description |
|---|
CHUNK_LENGTH_KB
chunk_length_kb |
CRC_CHECK_CHANCE
crc_check_chance |
SSTABLE_COMPRESSION
sstable_compression |
| Modifier and Type | Method and Description |
|---|---|
void |
checkValue(Object value)
Checks that the given value can be coerced into the type given by
Option.getType(). |
boolean |
escapesValue()
Whether this option should escape single quotes in its value.
|
String |
getName()
The (usually lower-cased, underscore-separated) name of this table option.
|
Class<?> |
getType()
The type that values must be able to be coerced into for this option.
|
boolean |
isCoerceable(Object value)
Tests whether the given value can be coerced into the type given by
Option.getType(). |
boolean |
quotesValue()
Whether this option's value should be single-quoted.
|
boolean |
requiresValue()
Whether this option requires a value.
|
boolean |
takesValue()
Whether this option takes a value.
|
String |
toString() |
String |
toString(Object value)
First ensures that the given value is coerceable into the type expected by this option, then returns the result of
Object.toString() called on the given value. |
static TableOption.CompressionOption |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TableOption.CompressionOption[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TableOption.CompressionOption SSTABLE_COMPRESSION
sstable_compressionpublic static final TableOption.CompressionOption CHUNK_LENGTH_KB
chunk_length_kbpublic static final TableOption.CompressionOption CRC_CHECK_CHANCE
crc_check_chancepublic static TableOption.CompressionOption[] values()
for (TableOption.CompressionOption c : TableOption.CompressionOption.values()) System.out.println(c);
public static TableOption.CompressionOption 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 Class<?> getType()
Optionpublic boolean takesValue()
OptiontakesValue in interface Optionpublic String getName()
Optionpublic boolean escapesValue()
OptionescapesValue in interface Optionpublic boolean quotesValue()
OptionquotesValue in interface Optionpublic boolean requiresValue()
OptionrequiresValue in interface Optionpublic void checkValue(Object value)
OptionOption.getType().checkValue in interface Optionpublic boolean isCoerceable(Object value)
OptionOption.getType().isCoerceable in interface Optionpublic String toString()
toString in class Enum<TableOption.CompressionOption>public String toString(@Nullable Object value)
OptionObject.toString() called on the given value. If this option is escaping quotes (Option.escapesValue() is
true), then single quotes will be escaped, and if this option is quoting values ( Option.quotesValue() is
true), then the value will be surrounded by single quotes. Given null, returns an empty string.toString in interface OptionOption.escapesValue(),
Option.quotesValue()Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.