Class EntryProcessorEntry<K,V>

java.lang.Object
com.github.benmanes.caffeine.jcache.processor.EntryProcessorEntry<K,V>
All Implemented Interfaces:
javax.cache.Cache.Entry<K,V>, javax.cache.processor.MutableEntry<K,V>

public final class EntryProcessorEntry<K,V> extends Object implements javax.cache.processor.MutableEntry<K,V>
An entry that is consumed by an EntryProcessor. The updates to the entry are replayed on the cache when the processor completes.
  • Field Details

    • hasEntry

      private final boolean hasEntry
    • key

      private final K key
    • action

      private Action action
    • value

      private @Nullable V value
    • cacheLoader

      private Optional<javax.cache.integration.CacheLoader<K,V>> cacheLoader
  • Constructor Details

    • EntryProcessorEntry

      public EntryProcessorEntry(K key, @Nullable V value, Optional<javax.cache.integration.CacheLoader<K,V>> cacheLoader)
  • Method Details

    • exists

      public boolean exists()
      Specified by:
      exists in interface javax.cache.processor.MutableEntry<K,V>
    • getKey

      public K getKey()
      Specified by:
      getKey in interface javax.cache.Cache.Entry<K,V>
    • getValue

      public @Nullable V getValue()
      Specified by:
      getValue in interface javax.cache.Cache.Entry<K,V>
      Specified by:
      getValue in interface javax.cache.processor.MutableEntry<K,V>
    • remove

      public void remove()
      Specified by:
      remove in interface javax.cache.processor.MutableEntry<K,V>
    • setValue

      public void setValue(V value)
      Specified by:
      setValue in interface javax.cache.processor.MutableEntry<K,V>
    • getAction

      public Action getAction()
      Returns:
      the dominant action performed by the processor on the entry.
    • unwrap

      public <T> T unwrap(Class<T> clazz)
      Specified by:
      unwrap in interface javax.cache.Cache.Entry<K,V>
    • toString

      public String toString()
      Overrides:
      toString in class Object