Package org.apache.cassandra.config
Class DataStorageSpec.LongMebibytesBound
- java.lang.Object
-
- org.apache.cassandra.config.DataStorageSpec
-
- org.apache.cassandra.config.DataStorageSpec.LongMebibytesBound
-
- Enclosing class:
- DataStorageSpec
public static final class DataStorageSpec.LongMebibytesBound extends DataStorageSpec
Represents a data storage quantity used for Cassandra configuration. The bound is [0, Long.MAX_VALUE) in mebibytes. If the user sets a different unit - we still validate that converted to mebibytes the quantity will not exceed that upper bound. (CASSANDRA-17571)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.config.DataStorageSpec
DataStorageSpec.DataStorageUnit, DataStorageSpec.IntBytesBound, DataStorageSpec.IntKibibytesBound, DataStorageSpec.IntMebibytesBound, DataStorageSpec.LongBytesBound, DataStorageSpec.LongMebibytesBound
-
-
Constructor Summary
Constructors Constructor Description LongMebibytesBound(long mebibytes)
Creates aDataStorageSpec.LongMebibytesBound
of the specified amount in mebibytes.LongMebibytesBound(long quantity, DataStorageSpec.DataStorageUnit unit)
Creates aDataStorageSpec.LongMebibytesBound
of the specified amount in the specified unit.LongMebibytesBound(java.lang.String value)
Creates aDataStorageSpec.LongMebibytesBound
of the specified amount.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
toBytes()
long
toKibibytes()
long
toMebibytes()
-
-
-
Constructor Detail
-
LongMebibytesBound
public LongMebibytesBound(java.lang.String value)
Creates aDataStorageSpec.LongMebibytesBound
of the specified amount.- Parameters:
value
- the data storage
-
LongMebibytesBound
public LongMebibytesBound(long quantity, DataStorageSpec.DataStorageUnit unit)
Creates aDataStorageSpec.LongMebibytesBound
of the specified amount in the specified unit.- Parameters:
quantity
- where quantity shouldn't be bigger than Long.MAX_VALUE - 1 in mebibytesunit
- in which the provided quantity is
-
LongMebibytesBound
public LongMebibytesBound(long mebibytes)
Creates aDataStorageSpec.LongMebibytesBound
of the specified amount in mebibytes.- Parameters:
mebibytes
- where mebibytes shouldn't be bigger than Long.MAX_VALUE-1
-
-