Package org.apache.cassandra.config
Class DurationSpec.LongMillisecondsBound
java.lang.Object
org.apache.cassandra.config.DurationSpec
org.apache.cassandra.config.DurationSpec.LongMillisecondsBound
- Enclosing class:
- DurationSpec
Represents a duration used for Cassandra configuration. The bound is [0, Long.MAX_VALUE) in milliseconds.
If the user sets a different unit - we still validate that converted to milliseconds the quantity will not exceed
that upper bound. (CASSANDRA-17571)
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.cassandra.config.DurationSpec
DurationSpec.IntMillisecondsBound, DurationSpec.IntMinutesBound, DurationSpec.IntSecondsBound, DurationSpec.LongMicrosecondsBound, DurationSpec.LongMillisecondsBound, DurationSpec.LongNanosecondsBound, DurationSpec.LongSecondsBound -
Constructor Summary
ConstructorsConstructorDescriptionLongMillisecondsBound(long milliseconds) Creates aDurationSpec.LongMillisecondsBoundof the specified amount in milliseconds.LongMillisecondsBound(long quantity, TimeUnit unit) Creates aDurationSpec.LongMillisecondsBoundof the specified amount in the specified unit.LongMillisecondsBound(String value) Creates aDurationSpec.LongMillisecondsBoundof the specified amount. -
Method Summary
-
Constructor Details
-
LongMillisecondsBound
Creates aDurationSpec.LongMillisecondsBoundof the specified amount. The bound is [0, Long.MAX_VALUE) in milliseconds.- Parameters:
value- the duration
-
LongMillisecondsBound
Creates aDurationSpec.LongMillisecondsBoundof the specified amount in the specified unit. The bound is [0, Long.MAX_VALUE) in milliseconds.- Parameters:
quantity- where quantity shouldn't be bigger than Long.MAX_VALUE - 1 in millisecondsunit- in which the provided quantity is
-
LongMillisecondsBound
public LongMillisecondsBound(long milliseconds) Creates aDurationSpec.LongMillisecondsBoundof the specified amount in milliseconds. The bound is [0, Long.MAX_VALUE) in milliseconds.- Parameters:
milliseconds- where milliseconds shouldn't be bigger than Long.MAX_VALUE-1
-
-
Method Details
-
toMilliseconds
public long toMilliseconds()- Returns:
- this duration in number of milliseconds
-