Package org.infinispan.server.hotrod
Enum TimeUnitValue
- java.lang.Object
-
- java.lang.Enum<TimeUnitValue>
-
- org.infinispan.server.hotrod.TimeUnitValue
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<TimeUnitValue>
public enum TimeUnitValue extends java.lang.Enum<TimeUnitValue>
- Since:
- 9.0
- Author:
- wburns
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DAYS
DEFAULT
HOURS
INFINITE
MICROSECONDS
MILLISECONDS
MINUTES
NANOSECONDS
SECONDS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TimeUnitValue
decode(byte rightBits)
static KeyValuePair<TimeUnitValue,TimeUnitValue>
decodePair(byte timeUnitValues)
static byte
encodeTimeUnits(long lifespan, java.util.concurrent.TimeUnit lifespanTimeUnit, long maxIdle, java.util.concurrent.TimeUnit maxIdleTimeUnit)
static TimeUnitValue
fromTimeUnit(java.util.concurrent.TimeUnit unit)
byte
getCode()
java.util.concurrent.TimeUnit
toTimeUnit()
static TimeUnitValue
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static TimeUnitValue[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SECONDS
public static final TimeUnitValue SECONDS
-
MILLISECONDS
public static final TimeUnitValue MILLISECONDS
-
NANOSECONDS
public static final TimeUnitValue NANOSECONDS
-
MICROSECONDS
public static final TimeUnitValue MICROSECONDS
-
MINUTES
public static final TimeUnitValue MINUTES
-
HOURS
public static final TimeUnitValue HOURS
-
DAYS
public static final TimeUnitValue DAYS
-
DEFAULT
public static final TimeUnitValue DEFAULT
-
INFINITE
public static final TimeUnitValue INFINITE
-
-
Method Detail
-
values
public static TimeUnitValue[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (TimeUnitValue c : TimeUnitValue.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TimeUnitValue valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getCode
public byte getCode()
-
toTimeUnit
public java.util.concurrent.TimeUnit toTimeUnit()
-
fromTimeUnit
public static TimeUnitValue fromTimeUnit(java.util.concurrent.TimeUnit unit)
-
decode
public static TimeUnitValue decode(byte rightBits)
-
decodePair
public static KeyValuePair<TimeUnitValue,TimeUnitValue> decodePair(byte timeUnitValues)
-
encodeTimeUnits
public static byte encodeTimeUnits(long lifespan, java.util.concurrent.TimeUnit lifespanTimeUnit, long maxIdle, java.util.concurrent.TimeUnit maxIdleTimeUnit)
-
-