public class FixedBitSetFilterCache extends AbstractIndexComponent implements org.apache.lucene.index.AtomicReader.CoreClosedListener, com.google.common.cache.RemovalListener<Object,com.google.common.cache.Cache<org.apache.lucene.search.Filter,FixedBitSetFilterCache.Value>>, Closeable
FixedBitSet
based filters and is unbounded by size or time.
Use this cache with care, only components that require that a filter is to be materialized as a FixedBitSet
and require that it should always be around should use this cache, otherwise the
FilterCache
should be used instead.Modifier and Type | Class and Description |
---|---|
static class |
FixedBitSetFilterCache.Value |
Modifier and Type | Field and Description |
---|---|
static String |
LOAD_RANDOM_ACCESS_FILTERS_EAGERLY |
componentSettings, index, indexSettings, logger
Constructor and Description |
---|
FixedBitSetFilterCache(Index index,
Settings indexSettings) |
Modifier and Type | Method and Description |
---|---|
void |
clear(String reason) |
void |
close() |
FixedBitSetFilter |
getFixedBitSetFilter(org.apache.lucene.search.Filter filter) |
void |
onClose(Object ownerCoreCacheKey) |
void |
onRemoval(com.google.common.cache.RemovalNotification<Object,com.google.common.cache.Cache<org.apache.lucene.search.Filter,FixedBitSetFilterCache.Value>> notification) |
void |
setIndexService(IndexService indexService) |
void |
setIndicesWarmer(IndicesWarmer indicesWarmer) |
index, nodeName
public static final String LOAD_RANDOM_ACCESS_FILTERS_EAGERLY
@Inject public FixedBitSetFilterCache(Index index, @IndexSettings Settings indexSettings)
@Inject(optional=true) public void setIndicesWarmer(IndicesWarmer indicesWarmer)
public void setIndexService(IndexService indexService)
public FixedBitSetFilter getFixedBitSetFilter(org.apache.lucene.search.Filter filter)
public void onClose(Object ownerCoreCacheKey)
onClose
in interface org.apache.lucene.index.AtomicReader.CoreClosedListener
public void close() throws ElasticsearchException
close
in interface Closeable
close
in interface AutoCloseable
ElasticsearchException
public void clear(String reason)
public void onRemoval(com.google.common.cache.RemovalNotification<Object,com.google.common.cache.Cache<org.apache.lucene.search.Filter,FixedBitSetFilterCache.Value>> notification)
onRemoval
in interface com.google.common.cache.RemovalListener<Object,com.google.common.cache.Cache<org.apache.lucene.search.Filter,FixedBitSetFilterCache.Value>>
Copyright © 2009–2015. All rights reserved.