Interface CacheEventListener<K,V>

Type Parameters:
K - the key type for the observed cache
V - the value type for the observed cache

public interface CacheEventListener<K,V>
Definition of the contract for implementing listeners to receive CacheEvents from a Cache.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onEvent(CacheEvent<? extends K,? extends V> event)
    Invoked on CacheEvent firing.
  • Method Details

    • onEvent

      void onEvent(CacheEvent<? extends K,? extends V> event)
      Invoked on CacheEvent firing.

      This method is invoked according to the EventOrdering, EventFiring and EventType requirements provided at listener registration time.

      Any exception thrown from this listener will be swallowed and logged but will not prevent other listeners to run.

      Parameters:
      event - the actual CacheEvent