Module org.apache.lucene.facet
Class NameHashIntCacheLRU
java.lang.Object
org.apache.lucene.facet.taxonomy.writercache.NameIntCacheLRU
org.apache.lucene.facet.taxonomy.writercache.NameHashIntCacheLRU
An LRU cache of mapping from name to int. Used to cache Ordinals of category paths. It uses as
key, hash of the path instead of the path. This way the cache takes less RAM, but correctness
depends on assuming no collisions.
-
Field Summary
Fields inherited from class org.apache.lucene.facet.taxonomy.writercache.NameIntCacheLRU
nHits, nMisses
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) Object
key
(FacetLabel name) Subclasses can override this to provide caching by e.g.(package private) Object
key
(FacetLabel name, int prefixLen) Methods inherited from class org.apache.lucene.facet.taxonomy.writercache.NameIntCacheLRU
clear, get, getMaxSize, getSize, makeRoomLRU, put, put, stats
-
Constructor Details
-
NameHashIntCacheLRU
NameHashIntCacheLRU(int maxCacheSize)
-
-
Method Details
-
key
Description copied from class:NameIntCacheLRU
Subclasses can override this to provide caching by e.g. hash of the string.- Overrides:
key
in classNameIntCacheLRU
-
key
- Overrides:
key
in classNameIntCacheLRU
-