Module spring.data.cassandra
Enum Class TableOption
- All Implemented Interfaces:
Serializable,Comparable<TableOption>,Constable,Option
Enumeration that represents all known table options. If a table option is not listed here, but is supported by
Cassandra, use the method
CreateTableSpecification.with(String, Object, boolean, boolean) to write the raw
value. Implements Option via delegation, since Enums can't extend anything.- Author:
- Matthew T. Adams, Mark Paluch, Mikhail Polivakha
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumKnown caching options.static enumKnown compaction options.static enumKnown compression options.static enumKnown KeyCaching OptionsNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionbloom_filter_fp_chancecachingcommentDeprecated.since 2.2.compaction.compression.dclocal_read_repair_chancegc_grace_secondsread_repair_chance -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckValue(Object value) Checks that the given value can be coerced into the type given byOption.getType().booleanWhether this option should escape single quotes in its value.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.booleanisCoerceable(Object value) Tests whether the given value can be coerced into the type given byOption.getType().booleanWhether this option's value should be single-quoted.booleanWhether this option requires a value.booleanWhether this option takes a value.toString()First ensures that the given value is coerceable into the type expected by this option, then returns the result ofObject.toString()called on the given value.static TableOptionReturns the enum constant of this class with the specified name.static TableOptionvalueOfIgnoreCase(String optionName) Look upTableOptionby name using case-insensitive lookups.static TableOption[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
COMMENT
comment -
COMPACT_STORAGE
Deprecated.since 2.2. Cassandra 4.x has deprecated compact storage.COMPACT STORAGE -
COMPACTION
compaction. Value is aMap<CompactionOption,Object>.- See Also:
-
COMPRESSION
compression. Value is aMap<CompressionOption,Object>.- See Also:
-
CACHING
caching- See Also:
-
BLOOM_FILTER_FP_CHANCE
bloom_filter_fp_chance -
READ_REPAIR_CHANCE
read_repair_chance -
DCLOCAL_READ_REPAIR_CHANCE
dclocal_read_repair_chance -
GC_GRACE_SECONDS
gc_grace_seconds
-
-
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
-
valueOfIgnoreCase
Look upTableOptionby name using case-insensitive lookups.- Parameters:
optionName- name of the option.- Returns:
- the option.
- Throws:
IllegalArgumentException- if the option cannot be determined.- Since:
- 4.1.1
-
getType
Description copied from interface:OptionThe type that values must be able to be coerced into for this option. -
takesValue
public boolean takesValue()Description copied from interface:OptionWhether this option takes a value.- Specified by:
takesValuein interfaceOption
-
getName
Description copied from interface:OptionThe (usually lower-cased, underscore-separated) name of this table option. -
escapesValue
public boolean escapesValue()Description copied from interface:OptionWhether this option should escape single quotes in its value.- Specified by:
escapesValuein interfaceOption
-
quotesValue
public boolean quotesValue()Description copied from interface:OptionWhether this option's value should be single-quoted.- Specified by:
quotesValuein interfaceOption
-
requiresValue
public boolean requiresValue()Description copied from interface:OptionWhether this option requires a value.- Specified by:
requiresValuein interfaceOption
-
checkValue
Description copied from interface:OptionChecks that the given value can be coerced into the type given byOption.getType().- Specified by:
checkValuein interfaceOption
-
isCoerceable
Description copied from interface:OptionTests whether the given value can be coerced into the type given byOption.getType().- Specified by:
isCoerceablein interfaceOption
-
toString
- Overrides:
toStringin classEnum<TableOption>
-
toString
Description copied from interface:OptionFirst ensures that the given value is coerceable into the type expected by this option, then returns the result ofObject.toString()called on the given value. If this option is escaping quotes (Option.escapesValue()istrue), then single quotes will be escaped, and if this option is quoting values (Option.quotesValue()istrue), then the value will be surrounded by single quotes. Given null, returns an empty string.
-