Enum Class RemovalCause

java.lang.Object
java.lang.Enum<RemovalCause>
io.github.xanthic.cache.api.domain.RemovalCause
All Implemented Interfaces:
Serializable, Comparable<RemovalCause>, Constable

public enum RemovalCause extends Enum<RemovalCause>
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 Constants
    Enum Constant
    Description
    The 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 Type
    Method
    Description
    boolean
    Whether the removal can be classified as an eviction (typically size-based or time-based)
    Returns the enum constant of this class with the specified name.
    static RemovalCause[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • SIZE

      public static final RemovalCause SIZE
      The maximum capacity constraint of the cache was hit.
    • TIME

      public static final RemovalCause TIME
      The cache entry reached expiration, according to the policy in the specification.
    • REPLACED

      public static final RemovalCause REPLACED
      The value associated with the key was replaced by a new value.
    • MANUAL

      public static final RemovalCause MANUAL
      The entry was fully removed from the cache.
    • OTHER

      public static final RemovalCause OTHER
      An extraneous eviction occurred (e.g., due to garbage collection).
  • Method Details

    • values

      public static RemovalCause[] 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

      public static RemovalCause valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • isEviction

      public boolean isEviction()
      Whether the removal can be classified as an eviction (typically size-based or time-based)