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 Event
Event.Type -
Method Summary
Methods inherited from interface TransactionalEvent
getGlobalTransaction, isOriginLocal
-
Method Details
-
getKey
K getKey()- Returns:
- the key to the affected cache entry.
-
getValue
-
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.
-