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

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
  • 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 to true.
      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.