Enum Class DisabledWriter

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

enum DisabledWriter extends Enum<DisabledWriter> implements CacheWriter<Object,Object>
  • Enum Constant Details

  • Constructor Details

    • DisabledWriter

      private DisabledWriter()
  • Method Details

    • values

      public static DisabledWriter[] 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 DisabledWriter 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
    • write

      public void write(Object key, Object value)
      Description copied from interface: CacheWriter
      Writes the value corresponding to the key to the external resource. The cache will communicate a write when an entry in the cache is inserted or updated explicitly. The implicit creation of an entry due to being loaded when absent is not communicated.
      Specified by:
      write in interface CacheWriter<Object,Object>
      Parameters:
      key - the non-null key whose value should be written
      value - the value associated with key that should be written
    • delete

      public void delete(Object key, Object value, RemovalCause cause)
      Description copied from interface: CacheWriter
      Deletes the value corresponding to the key from the external resource. The cache will communicate a delete when the entry is explicitly removed or evicted.
      Specified by:
      delete in interface CacheWriter<Object,Object>
      Parameters:
      key - the non-null key whose value was removed
      value - the value associated with key, or null if collected
      cause - the reason for which the entry was removed