Class JCacheEntryEvent<K,V>

java.lang.Object
java.util.EventObject
javax.cache.event.CacheEntryEvent<K,V>
com.github.benmanes.caffeine.jcache.event.JCacheEntryEvent<K,V>
All Implemented Interfaces:
Serializable, 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 Iterable<javax.cache.event.CacheEntryEvent<? extends K,? extends V>>
A cache event dispatched to a listener.
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • key

      private final K key
    • hasOldValue

      private final boolean hasOldValue
    • oldValue

      private final @Nullable V oldValue
    • newValue

      private final @Nullable V newValue
  • Constructor Details

    • JCacheEntryEvent

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

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

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