Package org.apache.cassandra.config
Class DurationSpec.LongSecondsBound
- java.lang.Object
-
- org.apache.cassandra.config.DurationSpec
-
- org.apache.cassandra.config.DurationSpec.LongSecondsBound
-
- Enclosing class:
- DurationSpec
public static final class DurationSpec.LongSecondsBound extends DurationSpec
Represents a duration used for Cassandra configuration. The bound is [0, Long.MAX_VALUE) in seconds. If the user sets a different unit - we still validate that converted to seconds 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 LongSecondsBound(long seconds)Creates aDurationSpec.LongSecondsBoundof the specified amount in seconds.LongSecondsBound(long quantity, java.util.concurrent.TimeUnit unit)Creates aDurationSpec.LongSecondsBoundof the specified amount in the specified unit.LongSecondsBound(java.lang.String value)Creates aDurationSpec.LongSecondsBoundof the specified amount.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longtoMilliseconds()longtoSeconds()
-
-
-
Constructor Detail
-
LongSecondsBound
public LongSecondsBound(java.lang.String value)
Creates aDurationSpec.LongSecondsBoundof the specified amount. The bound is [0, Long.MAX_VALUE) in seconds.- Parameters:
value- the duration
-
LongSecondsBound
public LongSecondsBound(long quantity, java.util.concurrent.TimeUnit unit)Creates aDurationSpec.LongSecondsBoundof the specified amount in the specified unit. The bound is [0, Long.MAX_VALUE) in seconds.- Parameters:
quantity- where quantity shouldn't be bigger than Long.MAX_VALUE - 1 in secondsunit- in which the provided quantity is
-
LongSecondsBound
public LongSecondsBound(long seconds)
Creates aDurationSpec.LongSecondsBoundof the specified amount in seconds. The bound is [0, Long.MAX_VALUE) in seconds.- Parameters:
seconds- where seconds shouldn't be bigger than Long.MAX_VALUE-1
-
-