Class ConcurrentLruCache<K,V>

java.lang.Object
no.hasmac.jsonld.context.cache.ConcurrentLruCache<K,V>
All Implemented Interfaces:
Cache<K,V>

public final class ConcurrentLruCache<K,V> extends Object implements Cache<K,V>
  • Field Details

    • cache

      private final Map<K,V> cache
  • Constructor Details

    • ConcurrentLruCache

      public ConcurrentLruCache(int maxCapacity)
  • Method Details

    • containsKey

      public boolean containsKey(K key)
      Specified by:
      containsKey in interface Cache<K,V>
    • get

      public V get(K key)
      Specified by:
      get in interface Cache<K,V>
    • put

      public void put(K key, V value)
      Specified by:
      put in interface Cache<K,V>
    • size

      public long size()