Class 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 java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      private Action action  
      private java.util.Optional<javax.cache.integration.CacheLoader<K,​V>> cacheLoader  
      private boolean hasEntry  
      private K key  
      private @Nullable V value  
    • Constructor Summary

      Constructors 
      Constructor Description
      EntryProcessorEntry​(K key, @Nullable V value, java.util.Optional<javax.cache.integration.CacheLoader<K,​V>> cacheLoader)  
    • Field Detail

      • hasEntry

        private final boolean hasEntry
      • key

        private final K key
      • action

        private Action action
      • value

        private @Nullable V value
      • cacheLoader

        private java.util.Optional<javax.cache.integration.CacheLoader<K,​V>> cacheLoader
    • Constructor Detail

      • EntryProcessorEntry

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

      • 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​(java.lang.Class<T> clazz)
        Specified by:
        unwrap in interface javax.cache.Cache.Entry<K,​V>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object