com.hazelcast.cache.impl
Class CacheEntryEventImpl<K,V>

java.lang.Object
  extended by java.util.EventObject
      extended by javax.cache.event.CacheEntryEvent<K,V>
          extended by com.hazelcast.cache.impl.CacheEntryEventImpl<K,V>
Type Parameters:
K - the type of key.
V - the type of value.
All Implemented Interfaces:
Serializable, javax.cache.Cache.Entry<K,V>

public class CacheEntryEventImpl<K,V>
extends javax.cache.event.CacheEntryEvent<K,V>

CacheEntryEvent implementation is the actual event object received by sub-interfaces of CacheEntryListener.

This implementation will provide source cache, the event type, key, new value, old value and availability.

See Also:
CacheEntryEvent, CacheEntryCreatedListener.onCreated(Iterable), CacheEntryUpdatedListener.onUpdated(Iterable), CacheEntryRemovedListener.onRemoved(Iterable), CacheEntryExpiredListener.onExpired(Iterable), Serialized Form

Field Summary
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
CacheEntryEventImpl(ICache<K,V> source, javax.cache.event.EventType eventType, K key, V newValue, V oldValue)
           
 
Method Summary
 K getKey()
           
 V getOldValue()
           
 V getValue()
           
 boolean isOldValueAvailable()
           
 String toString()
           
<T> T
unwrap(Class<T> clazz)
           
 
Methods inherited from class javax.cache.event.CacheEntryEvent
getEventType, getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheEntryEventImpl

public CacheEntryEventImpl(ICache<K,V> source,
                           javax.cache.event.EventType eventType,
                           K key,
                           V newValue,
                           V oldValue)
Method Detail

getOldValue

public 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>

getKey

public K getKey()

getValue

public V getValue()

unwrap

public <T> T unwrap(Class<T> clazz)

toString

public String toString()
Overrides:
toString in class EventObject


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.