Interface ICache<K,V>

All Superinterfaces:
CacheSize
All Known Implementing Classes:
CaffeineCache, SerializingCache

public interface ICache<K,V> extends CacheSize
This is similar to the Map interface, but requires maintaining a given capacity and does not require put or remove to return values, which lets SerializingCache be more efficient by avoiding deserialize except on get.
  • Method Details

    • put

      void put(K key, V value)
    • putIfAbsent

      boolean putIfAbsent(K key, V value)
    • replace

      boolean replace(K key, V old, V value)
    • get

      V get(K key)
    • remove

      void remove(K key)
    • clear

      void clear()
    • keyIterator

      Iterator<K> keyIterator()
    • hotKeyIterator

      Iterator<K> hotKeyIterator(int n)
    • containsKey

      boolean containsKey(K key)