Class JCacheEntryEvent<K,​V>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Iterable<javax.cache.event.CacheEntryEvent<? extends K,​? extends V>>, javax.cache.Cache.Entry<K,​V>

    final class JCacheEntryEvent<K,​V>
    extends javax.cache.event.CacheEntryEvent<K,​V>
    implements java.lang.Iterable<javax.cache.event.CacheEntryEvent<? extends K,​? extends V>>
    A cache event dispatched to a listener.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean hasOldValue  
      private K key  
      private @Nullable V newValue  
      private @Nullable V oldValue  
      private static long serialVersionUID  
      • Fields inherited from class java.util.EventObject

        source
    • Constructor Summary

      Constructors 
      Constructor Description
      JCacheEntryEvent​(javax.cache.Cache<K,​V> source, javax.cache.event.EventType eventType, K key, boolean hasOldValue, @Nullable V oldValue, @Nullable V newValue)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      K getKey()  
      @Nullable V getOldValue()  
      @Nullable V getValue()  
      boolean isOldValueAvailable()  
      java.util.Iterator<javax.cache.event.CacheEntryEvent<? extends K,​? extends V>> iterator()  
      <T> T unwrap​(java.lang.Class<T> clazz)  
      • Methods inherited from class javax.cache.event.CacheEntryEvent

        getEventType, getSource
      • Methods inherited from class java.util.EventObject

        toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Field Detail

      • key

        private final K key
      • hasOldValue

        private final boolean hasOldValue
      • oldValue

        private final @Nullable V oldValue
      • newValue

        private final @Nullable V newValue
    • Constructor Detail

      • JCacheEntryEvent

        JCacheEntryEvent​(javax.cache.Cache<K,​V> source,
                         javax.cache.event.EventType eventType,
                         K key,
                         boolean hasOldValue,
                         @Nullable V oldValue,
                         @Nullable V newValue)
    • Method Detail

      • 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 class javax.cache.event.CacheEntryEvent<K,​V>
      • getOldValue

        public @Nullable V getOldValue()
        Specified by:
        getOldValue in class javax.cache.event.CacheEntryEvent<K,​V>
      • isOldValueAvailable

        public boolean isOldValueAvailable()
        Specified by:
        isOldValueAvailable in class javax.cache.event.CacheEntryEvent<K,​V>
      • unwrap

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

        public java.util.Iterator<javax.cache.event.CacheEntryEvent<? extends K,​? extends V>> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<K>