public enum Converters extends java.lang.Enum<Converters>
Enum Constant and Description |
---|
BYTES_CUSTOM_DATASTORAGE
This converter is used to support backward compatibility for parameters where in the past negative number was used as a value
Example: native_transport_max_concurrent_requests_in_bytes_per_ip = -1 and native_transport_max_request_data_in_flight_per_ip = null
are equal.
|
BYTES_DATASTORAGE |
IDENTITY
This converter is used when we change the name of a cassandra.yaml configuration parameter but we want to be
able to still use the old name too.
|
KIBIBYTES_DATASTORAGE |
MEBIBYTES_DATA_STORAGE_INT |
MEBIBYTES_DATA_STORAGE_LONG |
MEBIBYTES_PER_SECOND_DATA_RATE |
MEGABITS_TO_BYTES_PER_SECOND_DATA_RATE
This converter is a custom one to support backward compatibility for stream_throughput_outbound and
inter_dc_stream_throughput_outbound which were provided in megabits per second prior CASSANDRA-15234.
|
MILLIS_CUSTOM_DURATION
This converter is used to support backward compatibility for parameters where in the past -1 was used as a value
Example: credentials_update_interval_in_ms = -1 and credentials_update_interval = null are equal.
|
MILLIS_DURATION_DOUBLE |
MILLIS_DURATION_INT |
MILLIS_DURATION_LONG |
MINUTES_CUSTOM_DURATION
This converter is used to support backward compatibility for parameters where in the past -1 was used as a value
Example: index_summary_resize_interval_in_minutes = -1 and index_summary_resize_interval = null are equal.
|
NEGATIVE_MEBIBYTES_DATA_STORAGE_INT |
NEGATIVE_SECONDS_DURATION |
SECONDS_CUSTOM_DURATION
This converter is used to support backward compatibility for Duration parameters where we added the opportunity
for the users to add a unit in the parameters' values but we didn't change the names.
|
SECONDS_DURATION |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
convert(java.lang.Object value)
|
java.lang.Class<?> |
getNewType()
Expected return type from
convert(Object) , and input type to unconvert(Object) |
java.lang.Class<?> |
getOldType()
|
java.lang.Object |
unconvert(java.lang.Object value)
|
static Converters |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Converters[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Converters IDENTITY
public static final Converters MILLIS_DURATION_LONG
public static final Converters MILLIS_DURATION_INT
public static final Converters MILLIS_DURATION_DOUBLE
public static final Converters MILLIS_CUSTOM_DURATION
public static final Converters SECONDS_DURATION
public static final Converters NEGATIVE_SECONDS_DURATION
public static final Converters SECONDS_CUSTOM_DURATION
public static final Converters MINUTES_CUSTOM_DURATION
public static final Converters MEBIBYTES_DATA_STORAGE_LONG
public static final Converters MEBIBYTES_DATA_STORAGE_INT
public static final Converters NEGATIVE_MEBIBYTES_DATA_STORAGE_INT
public static final Converters KIBIBYTES_DATASTORAGE
public static final Converters BYTES_DATASTORAGE
public static final Converters BYTES_CUSTOM_DATASTORAGE
public static final Converters MEBIBYTES_PER_SECOND_DATA_RATE
public static final Converters MEGABITS_TO_BYTES_PER_SECOND_DATA_RATE
public static Converters[] values()
for (Converters c : Converters.values()) System.out.println(c);
public static Converters valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.Class<?> getOldType()
Replaces
annotation in Config
public java.lang.Class<?> getNewType()
convert(Object)
, and input type to unconvert(Object)
convert(Object)
is expected to returnpublic java.lang.Object convert(java.lang.Object value)
value
- we will use from cassandra.yaml to create a new Config
parameter of type DurationSpec
,
DataRateSpec
or DataStorageSpec
DurationSpec
, DataRateSpec
or DataStorageSpec
public java.lang.Object unconvert(java.lang.Object value)
Replaces
annotation in Config
to get config parameters'
values in the old format pre-CASSANDRA-15234 and in the right units, used in the Virtual Tables to ensure backward
compatibilityvalue
- we will use to calculate the output valueCopyright © 2009-2022 The Apache Software Foundation