Package org.apache.cassandra.config
Class DurationSpec.IntMillisecondsBound
- java.lang.Object
-
- org.apache.cassandra.config.DurationSpec
-
- org.apache.cassandra.config.DurationSpec.IntMillisecondsBound
-
- Enclosing class:
- DurationSpec
public static final class DurationSpec.IntMillisecondsBound extends DurationSpec
Represents a duration used for Cassandra configuration. The bound is [0, Integer.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
Constructors Constructor Description IntMillisecondsBound(double quantity, java.util.concurrent.TimeUnit unit)
Below constructor is used only for backward compatibility for the old commitlog_sync_group_window_in_ms before 4.1 Creates aDurationSpec.IntMillisecondsBound
of the specified amount in the specified unit.IntMillisecondsBound(long milliseconds)
Creates aDurationSpec.IntMillisecondsBound
of the specified amount in milliseconds.IntMillisecondsBound(long quantity, java.util.concurrent.TimeUnit unit)
Creates aDurationSpec.IntMillisecondsBound
of the specified amount in the specified unit.IntMillisecondsBound(java.lang.String value)
Creates aDurationSpec.IntMillisecondsBound
of the specified amount.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
toMilliseconds()
Returns this duration in number of milliseconds as anint
-
-
-
Constructor Detail
-
IntMillisecondsBound
public IntMillisecondsBound(java.lang.String value)
Creates aDurationSpec.IntMillisecondsBound
of the specified amount. The bound is [0, Integer.MAX_VALUE) in milliseconds. The bound is [0, Integer.MAX_VALUE) in milliseconds.- Parameters:
value
- the duration
-
IntMillisecondsBound
public IntMillisecondsBound(long quantity, java.util.concurrent.TimeUnit unit)
Creates aDurationSpec.IntMillisecondsBound
of the specified amount in the specified unit. The bound is [0, Integer.MAX_VALUE) in milliseconds.- Parameters:
quantity
- where quantity shouldn't be bigger than Integer.MAX_VALUE - 1 in millisecondsunit
- in which the provided quantity is
-
IntMillisecondsBound
public IntMillisecondsBound(long milliseconds)
Creates aDurationSpec.IntMillisecondsBound
of the specified amount in milliseconds. The bound is [0, Integer.MAX_VALUE) in milliseconds.- Parameters:
milliseconds
- where milliseconds shouldn't be bigger than Integer.MAX_VALUE-1
-
IntMillisecondsBound
public IntMillisecondsBound(double quantity, java.util.concurrent.TimeUnit unit)
Below constructor is used only for backward compatibility for the old commitlog_sync_group_window_in_ms before 4.1 Creates aDurationSpec.IntMillisecondsBound
of the specified amount in the specified unit.- Parameters:
quantity
- where quantity shouldn't be bigger than Intetger.MAX_VALUE - 1 in millisecondsunit
- in which the provided quantity is
-
-