Interface CacheListener<K,V>

Type Parameters:
K - 缓存键
V - 缓存值

public interface CacheListener<K,V>
缓存监听,用于实现缓存操作时的回调监听,例如缓存对象的移除事件等
Since:
Java 17+
Author:
Kimi Liu
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onRemove(K key, V cachedObject)
    对象移除回调
  • Method Details

    • onRemove

      void onRemove(K key, V cachedObject)
      对象移除回调
      Parameters:
      key - 键
      cachedObject - 被缓存的对象