onCapacity method

  1. @override
CacheEntry<K, V>? onCapacity(
  1. K key
)
override

removes the entry denoted by key. This is called if the capacity is reached.

Implementation

@override
CacheEntry<K, V>? onCapacity(K key) {
  CacheEntry<K, V>? ce = super.onCapacity(key);
  if (ce != null) {
    --_removed;
    ++_removedCapacity;
  }
  return ce;
}