Package org.apache.cassandra.config
Class DataRateSpec.LongBytesPerSecondBound
- java.lang.Object
-
- org.apache.cassandra.config.DataRateSpec
-
- org.apache.cassandra.config.DataRateSpec.LongBytesPerSecondBound
-
- Enclosing class:
- DataRateSpec
public static final class DataRateSpec.LongBytesPerSecondBound extends DataRateSpec
Represents a data rate used for Cassandra configuration. The bound is [0, Long.MAX_VALUE) in bytes per second. If the user sets a different unit, we still validate that converted to bytes per second the quantity will not exceed that upper bound. (CASSANDRA-17571)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.config.DataRateSpec
DataRateSpec.DataRateUnit, DataRateSpec.LongBytesPerSecondBound
-
-
Constructor Summary
Constructors Constructor Description LongBytesPerSecondBound(long bytesPerSecond)
Creates aDataRateSpec.LongBytesPerSecondBound
of the specified amount in bytes per second.LongBytesPerSecondBound(long quantity, DataRateSpec.DataRateUnit unit)
Creates aDataRateSpec.LongBytesPerSecondBound
of the specified amount in the specified unit.LongBytesPerSecondBound(java.lang.String value)
Creates aDataRateSpec.LongBytesPerSecondBound
of the specified amount.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static DataRateSpec.LongBytesPerSecondBound
megabitsPerSecondInBytesPerSecond(long megabitsPerSecond)
Deprecated.See CASSANDRA-17225-
Methods inherited from class org.apache.cassandra.config.DataRateSpec
equals, hashCode, toBytesPerSecond, toBytesPerSecondAsInt, toKibibytesPerSecond, toKibibytesPerSecondAsInt, toMebibytesPerSecond, toMebibytesPerSecondAsInt, toMegabitsPerSecond, toMegabitsPerSecondAsInt, toString, unit
-
-
-
-
Constructor Detail
-
LongBytesPerSecondBound
public LongBytesPerSecondBound(java.lang.String value)
Creates aDataRateSpec.LongBytesPerSecondBound
of the specified amount.- Parameters:
value
- the data rate
-
LongBytesPerSecondBound
public LongBytesPerSecondBound(long quantity, DataRateSpec.DataRateUnit unit)
Creates aDataRateSpec.LongBytesPerSecondBound
of the specified amount in the specified unit.- Parameters:
quantity
- where quantity shouldn't be bigger than Long.MAX_VALUE - 1 in bytes per secondunit
- in which the provided quantity is
-
LongBytesPerSecondBound
public LongBytesPerSecondBound(long bytesPerSecond)
Creates aDataRateSpec.LongBytesPerSecondBound
of the specified amount in bytes per second.- Parameters:
bytesPerSecond
- where bytesPerSecond shouldn't be bigger than Long.MAX_VALUE
-
-
Method Detail
-
megabitsPerSecondInBytesPerSecond
@Deprecated(since="4.1") public static DataRateSpec.LongBytesPerSecondBound megabitsPerSecondInBytesPerSecond(long megabitsPerSecond)
Deprecated.See CASSANDRA-17225
-
-