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