Class ConcurrentCache<K,V>

java.lang.Object
org.eclipse.rdf4j.sail.lmdb.ConcurrentCache<K,V>

public class ConcurrentCache<K,V> extends Object
Fixed-size concurrent cache with approximate FIFO eviction per hash set. The cache never grows beyond its slot budget; capacity is rounded up to a power-of-two number of slots and entries are evicted in O(1).
  • Field Details

  • Constructor Details

    • ConcurrentCache

      public ConcurrentCache(int capacity)
  • Method Details

    • get

      public V get(Object key)
    • put

      public V put(K key, V value)
    • clear

      public void clear()
    • onEntryRemoval

      protected boolean onEntryRemoval(K key)
      Parameters:
      key - the key of the node to test for removal and do finalization on
      Returns:
      true if removal is approved
    • cleanUp

      protected void cleanUp()