Enum Class EvictionStrategy

java.lang.Object
java.lang.Enum<EvictionStrategy>
org.infinispan.eviction.EvictionStrategy
All Implemented Interfaces:
Serializable, Comparable<EvictionStrategy>, Constable

public enum EvictionStrategy extends Enum<EvictionStrategy>
Supported eviction strategies
Since:
4.0
Author:
Manik Surtani
  • Nested Class Summary Link icon

    Nested classes/interfaces inherited from class java.lang.Enum Link icon

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary Link icon

    Enum Constants
    Enum Constant
    Description
    Strategy where the cache will block new entries from being written if they would exceed the configured size
    Strategy where the cache does nothing but the user is assumed to manually invoke evict method
    Eviction Strategy where nothing is done by the cache and the user is probably not going to use eviction manually
    Strategy where the cache will remove entries to make room for new ones while staying under the configured size
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    boolean
    Whether or not the cache will do something due to the strategy
    boolean
    The cache will throw exceptions to prevent memory growth
    boolean
    The cache will remove other entries to make room to limit memory growth
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object Link icon

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

    • NONE Link icon

      public static final EvictionStrategy NONE
      Eviction Strategy where nothing is done by the cache and the user is probably not going to use eviction manually
    • MANUAL Link icon

      public static final EvictionStrategy MANUAL
      Strategy where the cache does nothing but the user is assumed to manually invoke evict method
    • REMOVE Link icon

      public static final EvictionStrategy REMOVE
      Strategy where the cache will remove entries to make room for new ones while staying under the configured size
    • EXCEPTION Link icon

      public static final EvictionStrategy EXCEPTION
      Strategy where the cache will block new entries from being written if they would exceed the configured size
  • Method Details Link icon

    • values Link icon

      public static EvictionStrategy[] 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 Link icon

      public static EvictionStrategy 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
    • isEnabled Link icon

      public boolean isEnabled()
      Whether or not the cache will do something due to the strategy
      Returns:
    • isExceptionBased Link icon

      public boolean isExceptionBased()
      The cache will throw exceptions to prevent memory growth
      Returns:
    • isRemovalBased Link icon

      public boolean isRemovalBased()
      The cache will remove other entries to make room to limit memory growth
      Returns: