Interface MemoizeCache<K,V>

Type Parameters:
K - type of the keys
V - type of the values
All Known Implementing Classes:
LRUCache, UnlimitedConcurrentCache

public interface MemoizeCache<K,V>
Represents a memoize cache with its essential methods
Author:
Vaclav Pech
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Invoked when some of the held SoftReferences have been evicted by the garbage collector and so should be removed from the cache.
    get(K key)
     
    put(K key, V value)
     
  • Method Details

    • put

      V put(K key, V value)
    • get

      V get(K key)
    • cleanUpNullReferences

      void cleanUpNullReferences()
      Invoked when some of the held SoftReferences have been evicted by the garbage collector and so should be removed from the cache. The implementation must ensure that concurrent invocations of all methods on the cache may occur from other threads and thus should protect any shared resources.