Package com.scaleout.client.caching
Enum Class TimeoutType
- All Implemented Interfaces:
Serializable
,Comparable<TimeoutType>
,Constable
The
TimeoutType
enum is used to indicate the type of timeout an object uses.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe object uses an absolute timeout.The object's timeout is reset when the object is updated, but it is not reset if the object is read.The object uses a sliding timeout that is reset every time an object is accessed (either updated or read). -
Method Summary
Modifier and TypeMethodDescriptionstatic TimeoutType
fromString
(String value) Retrieve a TimeoutType enum from a string.static TimeoutType
Returns the enum constant of this class with the specified name.static TimeoutType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Sliding
The object uses a sliding timeout that is reset every time an object is accessed (either updated or read). -
Absolute
The object uses an absolute timeout. -
ResetOnUpdate
The object's timeout is reset when the object is updated, but it is not reset if the object is read.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
fromString
Retrieve a TimeoutType enum from a string. Accepted values:Constants.OBJECT_TIMEOUT_TYPE_ABSOLUTE
Constants.OBJECT_TIMEOUT_TYPE_RESET
Constants.OBJECT_TIMEOUT_TYPE_SLIDING
ALl other values will cause this method to throw a- Parameters:
value
-Constants.OBJECT_TIMEOUT_TYPE_ABSOLUTE
,Constants.OBJECT_TIMEOUT_TYPE_RESET
, orConstants.OBJECT_TIMEOUT_TYPE_SLIDING
-- any other String will throwIllegalStateException
.- Returns:
- the TimeoutType that maps from the parameter string value.
-