Package org.infinispan.jcache
Class RICacheEntryEvent<K,V>
- java.lang.Object
-
- java.util.EventObject
-
- javax.cache.event.CacheEntryEvent<K,V>
-
- org.infinispan.jcache.RICacheEntryEvent<K,V>
-
- Type Parameters:
K- the type of keys maintained by this cacheV- the type of cached values
- All Implemented Interfaces:
Serializable,javax.cache.Cache.Entry<K,V>
public class RICacheEntryEvent<K,V> extends javax.cache.event.CacheEntryEvent<K,V>The reference implementation of theCacheEntryEvent.- Since:
- 1.0
- Author:
- Greg Luck
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description RICacheEntryEvent(javax.cache.Cache<K,V> source, K key, V value, javax.cache.event.EventType eventType)Constructs a cache entry event from a given cache as source (without an old value)RICacheEntryEvent(javax.cache.Cache<K,V> source, K key, V value, V oldValue, javax.cache.event.EventType eventType)Constructs a cache entry event from a given cache as source (with an old value)RICacheEntryEvent(javax.cache.Cache<K,V> source, K key, V value, V oldValue, javax.cache.event.EventType eventType, boolean oldValueAvailable)Constructs a cache entry event from a given cache as source with an old value, explicitly specifying whether old value is available
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description KgetKey()Returns the key of the cache entry with the eventVgetOldValue()VgetValue()Returns the value of the cache entry with the eventbooleanisOldValueAvailable()Whether the old value is availableStringtoString()<T> Tunwrap(Class<T> clazz)
-
-
-
Constructor Detail
-
RICacheEntryEvent
public RICacheEntryEvent(javax.cache.Cache<K,V> source, K key, V value, javax.cache.event.EventType eventType)
Constructs a cache entry event from a given cache as source (without an old value)- Parameters:
source- the cache that originated the eventkey- the keyvalue- the value
-
RICacheEntryEvent
public RICacheEntryEvent(javax.cache.Cache<K,V> source, K key, V value, V oldValue, javax.cache.event.EventType eventType)
Constructs a cache entry event from a given cache as source (with an old value)- Parameters:
source- the cache that originated the eventkey- the keyvalue- the valueoldValue- the oldValue
-
RICacheEntryEvent
public RICacheEntryEvent(javax.cache.Cache<K,V> source, K key, V value, V oldValue, javax.cache.event.EventType eventType, boolean oldValueAvailable)
Constructs a cache entry event from a given cache as source with an old value, explicitly specifying whether old value is available- Parameters:
source- the cache that originated the eventkey- the keyvalue- the valueoldValue- the oldValueoldValueAvailable- indicates whether old value is available
-
-
Method Detail
-
getKey
public K getKey()
Returns the key of the cache entry with the event- Returns:
- the key
-
getValue
public V getValue()
Returns the value of the cache entry with the event
-
unwrap
public <T> T unwrap(Class<T> clazz)
-
getOldValue
public V getOldValue()
-
isOldValueAvailable
public boolean isOldValueAvailable()
Whether the old value is available
-
toString
public String toString()
- Overrides:
toStringin classEventObject
-
-