Enum Class RemovalCause
- All Implemented Interfaces:
Serializable
,Comparable<RemovalCause>
,Constable
The reason for a cache entry being removed.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe entry was fully removed from the cache.An extraneous eviction occurred (e.g., due to garbage collection).The value associated with the key was replaced by a new value.The maximum capacity constraint of the cache was hit.The cache entry reached expiration, according to the policy in the specification. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether the removal can be classified as an eviction (typically size-based or time-based)static RemovalCause
Returns the enum constant of this class with the specified name.static RemovalCause[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SIZE
The maximum capacity constraint of the cache was hit. -
TIME
The cache entry reached expiration, according to the policy in the specification. -
REPLACED
The value associated with the key was replaced by a new value. -
MANUAL
The entry was fully removed from the cache. -
OTHER
An extraneous eviction occurred (e.g., due to garbage collection).
-
-
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
-
isEviction
public boolean isEviction()Whether the removal can be classified as an eviction (typically size-based or time-based)
-