Class LoomCacheEntryEvent<K,V>
java.lang.Object
java.util.EventObject
javax.cache.event.CacheEntryEvent<K,V>
com.loomcache.server.jcache.LoomCacheEntryEvent<K,V>
- Type Parameters:
K- the key typeV- the value type
- All Implemented Interfaces:
Serializable, javax.cache.Cache.Entry<K,V>
public final class LoomCacheEntryEvent<K,V>
extends javax.cache.event.CacheEntryEvent<K,V>
Represents a cache entry lifecycle event.
Fired when cache entries are created, updated, removed, or expired.
Extends CacheEntryEvent so listeners registered via
both the native CacheEntryListener and JSR-107 listener types receive
identical event objects.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumLegacy event type enumeration preserved for backwards compatibility. -
Field Summary
Fields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionLoomCacheEntryEvent(K key, @Nullable V oldValue, @Nullable V newValue, LoomCacheEntryEvent.EventType eventType, @Nullable Object source) Construct a cache entry event. -
Method Summary
Methods inherited from class javax.cache.event.CacheEntryEvent
getEventType, getSource
-
Constructor Details
-
LoomCacheEntryEvent
public LoomCacheEntryEvent(K key, @Nullable V oldValue, @Nullable V newValue, LoomCacheEntryEvent.EventType eventType, @Nullable Object source) Construct a cache entry event.Accepts
nullsource for backwards compatibility. JSR-107's parent constructor requires aCachesource, so when the caller passes null or a non-Cache we substitute a no-op placeholder. Original source is preserved viasource().
-
-
Method Details
-
key
-
oldValue
-
newValue
-
eventType
-
source
-
timestamp
public long timestamp() -
getKey
-
getValue
-
getOldValue
-
isOldValueAvailable
-
unwrap
-
isSourceCache
public boolean isSourceCache() -
equals
-
hashCode
-
toString
- Overrides:
toStringin classEventObject
-