Class IndicesFieldDataCache
java.lang.Object
org.opensearch.indices.fielddata.cache.IndicesFieldDataCache
- All Implemented Interfaces:
Closeable
,AutoCloseable
,RemovalListener<IndicesFieldDataCache.Key,
,org.apache.lucene.util.Accountable> org.opensearch.common.lease.Releasable
@PublicApi(since="1.0.0")
public class IndicesFieldDataCache
extends Object
implements RemovalListener<IndicesFieldDataCache.Key,org.apache.lucene.util.Accountable>, org.opensearch.common.lease.Releasable
The field data cache for multiple indices
- Opensearch.api:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Computes a weight based on ramBytesUsedstatic class
Key for the indices field data cache -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Setting
<org.opensearch.core.common.unit.ByteSizeValue> -
Constructor Summary
ConstructorsConstructorDescriptionIndicesFieldDataCache
(Settings settings, IndexFieldDataCache.Listener indicesFieldDataCacheListener) -
Method Summary
Modifier and TypeMethodDescriptionbuildIndexFieldDataCache
(IndexFieldDataCache.Listener listener, org.opensearch.core.index.Index index, String fieldName) void
close()
Cache
<IndicesFieldDataCache.Key, org.apache.lucene.util.Accountable> getCache()
void
onRemoval
(RemovalNotification<IndicesFieldDataCache.Key, org.apache.lucene.util.Accountable> notification)
-
Field Details
-
INDICES_FIELDDATA_CACHE_SIZE_KEY
public static final Setting<org.opensearch.core.common.unit.ByteSizeValue> INDICES_FIELDDATA_CACHE_SIZE_KEY
-
-
Constructor Details
-
IndicesFieldDataCache
public IndicesFieldDataCache(Settings settings, IndexFieldDataCache.Listener indicesFieldDataCacheListener)
-
-
Method Details
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in interfaceorg.opensearch.common.lease.Releasable
-
buildIndexFieldDataCache
public IndexFieldDataCache buildIndexFieldDataCache(IndexFieldDataCache.Listener listener, org.opensearch.core.index.Index index, String fieldName) -
getCache
-
onRemoval
public void onRemoval(RemovalNotification<IndicesFieldDataCache.Key, org.apache.lucene.util.Accountable> notification) - Specified by:
onRemoval
in interfaceRemovalListener<IndicesFieldDataCache.Key,
org.apache.lucene.util.Accountable>
-