Enum Class CacheStrategy

java.lang.Object
java.lang.Enum<CacheStrategy>
org.wildfly.clustering.server.cache.CacheStrategy
All Implemented Interfaces:
Serializable, Comparable<CacheStrategy>, Constable, CacheFactory

public enum CacheStrategy extends Enum<CacheStrategy> implements CacheFactory
Generic level-one cache implementations.
Author:
Paul Ferraro
  • Enum Constant Details

    • NONE

      public static final CacheStrategy NONE
      Creates a zero-capacity cache, where entries are always "absent". Cache.computeIfAbsent(Object, BiFunction) will always creates its value from the specified factory. Intended for use when some other mechanism already ensures mutually exclusive access to the requested state.
    • CONCURRENT

      public static final CacheStrategy CONCURRENT
      Creates a cache of entries in use by concurrent threads. Cache entries are auto-removed when the last requestor invokes Runnable.run() on the Runnable with which it was created.
  • Method Details

    • values

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