Package org.elasticsearch.indices
Interface ESCacheHelper
- All Known Implementing Classes:
ESCacheHelper.Wrapper
public interface ESCacheHelper
Cache helper that allows swapping in implementations that are different to Lucene's
IndexReader.CacheHelper which ties its lifecycle to that of the underlying reader.
For FrozenEngine, which opens / closes readers on-demand, we don't want caches
to be invalidated as soon as a given search terminates, but want to tie the
entry in the cache to the lifecycle of the shard.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static class
Implementation ofESCacheHelper
that wraps anIndexReader.CacheHelper
. -
Method Summary
-
Method Details
-
getKey
Object getKey()Get a key that the resource can be cached on. The given entry can be compared using identity, i.e.,Object.equals(java.lang.Object)
is implemented as==
andObject.hashCode()
is implemented asSystem.identityHashCode(java.lang.Object)
. -
addClosedListener
Adds a listener which will be called when the resource guarded bygetKey()
is closed.
-