Interface CacheUtils.CacheEvictionListener<K,V>

Type Parameters:
K - the cache key type
V - the cache value type
All Known Implementing Classes:
JCacheContentCachingService
Enclosing class:
CacheUtils
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface CacheUtils.CacheEvictionListener<K,V>
Listener API for "eviction" events.

JCache does not offer an "eviction" event, when the cache removes an entry due to a size constraint. This API is provided to work with cache implementations that do support such events, like EhCache.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onCacheEviction(K key, V value)
    Receive a cache eviction notification.
  • Method Details

    • onCacheEviction

      void onCacheEviction(K key, V value)
      Receive a cache eviction notification.
      Parameters:
      key - the evicted key
      value - the evicted value