Enum Class MissingCacheStrategy

java.lang.Object
java.lang.Enum<MissingCacheStrategy>
org.hibernate.cache.jcache.MissingCacheStrategy
All Implemented Interfaces:
Serializable, Comparable<MissingCacheStrategy>, Constable

public enum MissingCacheStrategy extends Enum<MissingCacheStrategy>
  • Enum Constant Details

    • FAIL

      public static final MissingCacheStrategy FAIL
      Fail with an exception on missing caches.
    • CREATE_WARN

      public static final MissingCacheStrategy CREATE_WARN
      Create a new cache when a cache is not found (see CREATE), and also log a warning about the missing cache.
    • CREATE

      public static final MissingCacheStrategy CREATE
      Create a new cache when a cache is not found, without logging any warning about the missing cache. Note that caches created this way may be very badly configured (unlimited size and no eviction in particular) unless the cache provider was explicitly configured to use an appropriate configuration for default caches. Ehcache in particular allows to set such default configuration using cache templates, see http://www.ehcache.org/documentation/3.0/107.html#supplement-jsr-107-configurations
  • Method Details

    • values

      public static MissingCacheStrategy[] 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 MissingCacheStrategy 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
    • getExternalRepresentation

      public String getExternalRepresentation()
    • interpretSetting

      public static MissingCacheStrategy interpretSetting(Object value)