Enum Class DisabledCacheWriter

java.lang.Object
java.lang.Enum<DisabledCacheWriter>
com.github.benmanes.caffeine.jcache.integration.DisabledCacheWriter
All Implemented Interfaces:
Serializable, Comparable<DisabledCacheWriter>, Constable, javax.cache.integration.CacheWriter<Object,Object>

public enum DisabledCacheWriter extends Enum<DisabledCacheWriter> implements javax.cache.integration.CacheWriter<Object,Object>
A cache writer that does nothing.
  • Enum Constant Details

  • Constructor Details

    • DisabledCacheWriter

      private DisabledCacheWriter()
  • Method Details

    • values

      public static DisabledCacheWriter[] 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 DisabledCacheWriter 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
    • get

      public static <K, V> javax.cache.integration.CacheWriter<K,V> get()
      Returns a disabled cache writer.
      Type Parameters:
      K - the type of key
      V - the type of value
      Returns:
      a cache writer that performs no operation
    • write

      public void write(javax.cache.Cache.Entry<?,?> entry)
      Specified by:
      write in interface javax.cache.integration.CacheWriter<Object,Object>
    • writeAll

      public void writeAll(Collection<javax.cache.Cache.Entry<?,?>> entries)
      Specified by:
      writeAll in interface javax.cache.integration.CacheWriter<Object,Object>
    • delete

      public void delete(Object key)
      Specified by:
      delete in interface javax.cache.integration.CacheWriter<Object,Object>
    • deleteAll

      public void deleteAll(Collection<?> keys)
      Specified by:
      deleteAll in interface javax.cache.integration.CacheWriter<Object,Object>