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
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
ConstructorsConstructorDescriptionLongBytesPerSecondBound(long bytesPerSecond) Creates aDataRateSpec.LongBytesPerSecondBoundof the specified amount in bytes per second.LongBytesPerSecondBound(long quantity, DataRateSpec.DataRateUnit unit) Creates aDataRateSpec.LongBytesPerSecondBoundof the specified amount in the specified unit.LongBytesPerSecondBound(String value) Creates aDataRateSpec.LongBytesPerSecondBoundof the specified amount. -
Method Summary
Modifier and TypeMethodDescriptionmegabitsPerSecondInBytesPerSecond(long megabitsPerSecond) Deprecated.See CASSANDRA-17225Methods inherited from class org.apache.cassandra.config.DataRateSpec
equals, hashCode, toBytesPerSecond, toBytesPerSecondAsInt, toKibibytesPerSecond, toKibibytesPerSecondAsInt, toMebibytesPerSecond, toMebibytesPerSecondAsInt, toMegabitsPerSecond, toMegabitsPerSecondAsInt, toString, unit
-
Constructor Details
-
LongBytesPerSecondBound
Creates aDataRateSpec.LongBytesPerSecondBoundof the specified amount.- Parameters:
value- the data rate
-
LongBytesPerSecondBound
Creates aDataRateSpec.LongBytesPerSecondBoundof 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.LongBytesPerSecondBoundof the specified amount in bytes per second.- Parameters:
bytesPerSecond- where bytesPerSecond shouldn't be bigger than Long.MAX_VALUE
-
-
Method Details
-
megabitsPerSecondInBytesPerSecond
@Deprecated(since="4.1") public static DataRateSpec.LongBytesPerSecondBound megabitsPerSecondInBytesPerSecond(long megabitsPerSecond) Deprecated.See CASSANDRA-17225
-