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 the
CacheEntryEvent.- Since:
- 1.0
- Author:
- Greg Luck
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionRICacheEntryEvent(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
Methods inherited from class javax.cache.event.CacheEntryEvent
getEventType, getSource
-
Constructor Details
-
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 Details
-
getKey
Returns the key of the cache entry with the event- Returns:
- the key
-
getValue
Returns the value of the cache entry with the event -
unwrap
-
getOldValue
-
isOldValueAvailable
public boolean isOldValueAvailable()Whether the old value is available -
toString
- Overrides:
toStringin classEventObject
-