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>
- All Known Implementing Classes:
ClusterEvent
,EventImpl
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
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 Details
-
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
- 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.
-