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
public static final class DurationSpec.LongMillisecondsBound extends 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.LongMillisecondsBound, DurationSpec.LongNanosecondsBound, DurationSpec.LongSecondsBound
-
-
Constructor Summary
Constructors Constructor Description LongMillisecondsBound(long milliseconds)Creates aDurationSpec.LongMillisecondsBoundof the specified amount in milliseconds.LongMillisecondsBound(long quantity, java.util.concurrent.TimeUnit unit)Creates aDurationSpec.LongMillisecondsBoundof the specified amount in the specified unit.LongMillisecondsBound(java.lang.String value)Creates aDurationSpec.LongMillisecondsBoundof the specified amount.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longtoMilliseconds()
-
-
-
Constructor Detail
-
LongMillisecondsBound
public LongMillisecondsBound(java.lang.String value)
Creates aDurationSpec.LongMillisecondsBoundof the specified amount. The bound is [0, Long.MAX_VALUE) in milliseconds.- Parameters:
value- the duration
-
LongMillisecondsBound
public LongMillisecondsBound(long quantity, java.util.concurrent.TimeUnit unit)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
-
-