Package org.apache.cassandra.utils
Enum StorageCompatibilityMode
- java.lang.Object
-
- java.lang.Enum<StorageCompatibilityMode>
-
- org.apache.cassandra.utils.StorageCompatibilityMode
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<StorageCompatibilityMode>
public enum StorageCompatibilityMode extends java.lang.Enum<StorageCompatibilityMode>
The mode of compatibility with older Cassandra versions.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CASSANDRA_4
Stay compatible with Cassandra 4.x, opting out from any new features that will prevent a rollback to 4.x.NONE
Don't try to be compatible with older versions.UPGRADING
Use the storage formats of the current version, but disabling features that are not compatible with any not-upgraded nodes in the cluster.
-
Field Summary
Fields Modifier and Type Field Description int
major
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StorageCompatibilityMode
current()
boolean
disabled()
boolean
isBefore(int major)
void
validateSstableFormat(SSTableFormat<?,?> selectedFormat)
static StorageCompatibilityMode
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static StorageCompatibilityMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CASSANDRA_4
public static final StorageCompatibilityMode CASSANDRA_4
Stay compatible with Cassandra 4.x, opting out from any new features that will prevent a rollback to 4.x. At the moment, this means: - Deletion times will be limited to 2038, instead of the year 2106 limit introduced by 5.0.
-
UPGRADING
public static final StorageCompatibilityMode UPGRADING
Use the storage formats of the current version, but disabling features that are not compatible with any not-upgraded nodes in the cluster. Use this during rolling upgrades to a new major Cassandra version. Once all nodes have been upgraded, you can set the compatibility toNONE
.
-
NONE
public static final StorageCompatibilityMode NONE
Don't try to be compatible with older versions. Data will be written with the most recent format, which might prevent a rollback to previous Cassandra versions. Features that are not compatible with older nodes will be enabled, assuming that all nodes in the cluster are in the same major version as this node.
-
-
Method Detail
-
values
public static StorageCompatibilityMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (StorageCompatibilityMode c : StorageCompatibilityMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StorageCompatibilityMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
current
public static StorageCompatibilityMode current()
-
disabled
public boolean disabled()
-
isBefore
public boolean isBefore(int major)
-
validateSstableFormat
public void validateSstableFormat(SSTableFormat<?,?> selectedFormat)
-
-