Class BinSearchResourceCache

java.lang.Object
org.aksw.commons.io.hadoop.binseach.v2.BinSearchResourceCache

public class BinSearchResourceCache extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Supplier<org.aksw.commons.io.hadoop.binseach.v2.BinSearchResourceCache.CacheEntry>
    Factory for the caches of individual resources.
    protected com.github.benmanes.caffeine.cache.Cache<Object,org.aksw.commons.io.hadoop.binseach.v2.BinSearchResourceCache.CacheEntry>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    BinSearchResourceCache(int maxCacheSize)
     
    BinSearchResourceCache(com.github.benmanes.caffeine.cache.Cache<Object,org.aksw.commons.io.hadoop.binseach.v2.BinSearchResourceCache.CacheEntry> resourceCache, Supplier<org.aksw.commons.io.hadoop.binseach.v2.BinSearchResourceCache.CacheEntry> cacheFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.aksw.commons.io.hadoop.binseach.v2.BinSearchResourceCache.CacheEntry
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • resourceCache

      protected com.github.benmanes.caffeine.cache.Cache<Object,org.aksw.commons.io.hadoop.binseach.v2.BinSearchResourceCache.CacheEntry> resourceCache
    • cacheFactory

      protected Supplier<org.aksw.commons.io.hadoop.binseach.v2.BinSearchResourceCache.CacheEntry> cacheFactory
      Factory for the caches of individual resources.
  • Constructor Details

    • BinSearchResourceCache

      public BinSearchResourceCache(int maxCacheSize)
    • BinSearchResourceCache

      public BinSearchResourceCache(com.github.benmanes.caffeine.cache.Cache<Object,org.aksw.commons.io.hadoop.binseach.v2.BinSearchResourceCache.CacheEntry> resourceCache, Supplier<org.aksw.commons.io.hadoop.binseach.v2.BinSearchResourceCache.CacheEntry> cacheFactory)
  • Method Details

    • getOrCreate

      public org.aksw.commons.io.hadoop.binseach.v2.BinSearchResourceCache.CacheEntry getOrCreate(Object key)