Interface CacheEntryEvent<K,V>
-
- All Superinterfaces:
Event<K,V>,TransactionalEvent<K,V>
- All Known Subinterfaces:
CacheEntryActivatedEvent<K,V>,CacheEntryCreatedEvent<K,V>,CacheEntryExpiredEvent<K,V>,CacheEntryInvalidatedEvent<K,V>,CacheEntryLoadedEvent<K,V>,CacheEntryModifiedEvent<K,V>,CacheEntryPassivatedEvent<K,V>,CacheEntryRemovedEvent<K,V>,CacheEntryVisitedEvent<K,V>
public interface CacheEntryEvent<K,V> extends TransactionalEvent<K,V>
A transactional event subtype that additionally expose a key as such events pertain to a specific cache entry.- Since:
- 4.0
- Author:
- Manik Surtani
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.notifications.cachelistener.event.Event
Event.Type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description KgetKey()MetadatagetMetadata()Retrieves the metadata associated with the entry.default ObjectgetSource()VgetValue()Retrieves the value of the affected cache entrydefault booleanisCurrentState()-
Methods inherited from interface org.infinispan.notifications.cachelistener.event.Event
getCache, getType, isPre
-
Methods inherited from interface org.infinispan.notifications.cachelistener.event.TransactionalEvent
getGlobalTransaction, isOriginLocal
-
-
-
-
Method Detail
-
getKey
K getKey()
- Returns:
- the key to the affected cache entry.
-
getValue
V getValue()
Retrieves the value of the affected cache entry- Returns:
- the value of the cache entry
-
getMetadata
Metadata getMetadata()
Retrieves the metadata associated with the entry.- Returns:
- the metadata of the cache entry
- Since:
- 7.0
-
isCurrentState
default boolean isCurrentState()
- Returns:
- True if this event is generated from an existing entry as the listener
has
Listener.includeCurrentState()set totrue. - Since:
- 9.3
-
getSource
default Object getSource()
- Returns:
- an identifier of the transaction or cache invocation that triggered the event.
In a transactional cache, it is the same as
TransactionalEvent.getGlobalTransaction(). In a non-transactional cache, it is an internal object that identifies the cache invocation.
-
-