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