Package org.apache.lucene.index
Interface IndexReader.CacheHelper
-
- Enclosing class:
- IndexReader
public static interface IndexReader.CacheHelper
A utility class that gives hooks in order to help build a cache based on the data that is contained in this index.- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addClosedListener(IndexReader.ClosedListener listener)
Add aIndexReader.ClosedListener
which will be called when the resource guarded bygetKey()
is closed.IndexReader.CacheKey
getKey()
Get a key that the resource can be cached on.
-
-
-
Method Detail
-
getKey
IndexReader.CacheKey getKey()
Get a key that the resource can be cached on. The given entry can be compared using identity, ie.Object.equals(java.lang.Object)
is implemented as==
andObject.hashCode()
is implemented asSystem.identityHashCode(java.lang.Object)
.
-
addClosedListener
void addClosedListener(IndexReader.ClosedListener listener)
Add aIndexReader.ClosedListener
which will be called when the resource guarded bygetKey()
is closed.
-
-