Package org.apache.cassandra.config
Class DataStorageSpec.IntBytesBound
- java.lang.Object
-
- org.apache.cassandra.config.DataStorageSpec
-
- org.apache.cassandra.config.DataStorageSpec.IntBytesBound
-
- Enclosing class:
- DataStorageSpec
public static final class DataStorageSpec.IntBytesBound extends DataStorageSpec
Represents a data storage quantity used for Cassandra configuration. The bound is [0, Integer.MAX_VALUE) in bytes. If the user sets a different unit - we still validate that converted to bytes 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 IntBytesBound(long bytes)
Creates aDataStorageSpec.IntBytesBound
of the specified amount in bytes.IntBytesBound(long quantity, DataStorageSpec.DataStorageUnit unit)
Creates aDataStorageSpec.IntBytesBound
of the specified amount in the specified unit.IntBytesBound(java.lang.String value)
Creates aDataStorageSpec.IntBytesBound
of the specified amount.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
toBytes()
Returns the amount of data storage in bytes as anint
-
-
-
Constructor Detail
-
IntBytesBound
public IntBytesBound(java.lang.String value)
Creates aDataStorageSpec.IntBytesBound
of the specified amount.- Parameters:
value
- the data storage
-
IntBytesBound
public IntBytesBound(long quantity, DataStorageSpec.DataStorageUnit unit)
Creates aDataStorageSpec.IntBytesBound
of the specified amount in the specified unit.- Parameters:
quantity
- where quantity shouldn't be bigger than Integer.MAX_VALUE - 1 in bytesunit
- in which the provided quantity is
-
IntBytesBound
public IntBytesBound(long bytes)
Creates aDataStorageSpec.IntBytesBound
of the specified amount in bytes.- Parameters:
bytes
- where bytes shouldn't be bigger than Integer.MAX_VALUE-1
-
-