org.elasticsearch.index.cache.filter.soft
Class SoftFilterCache

java.lang.Object
  extended by org.elasticsearch.index.AbstractIndexComponent
      extended by org.elasticsearch.index.cache.filter.support.AbstractConcurrentMapFilterCache
          extended by org.elasticsearch.index.cache.filter.soft.SoftFilterCache
All Implemented Interfaces:
org.apache.lucene.index.IndexReader.ReaderFinishedListener, org.elasticsearch.common.collect.MapEvictionListener<org.apache.lucene.search.Filter,DocSet>, CloseableComponent, FilterCache, IndexComponent

public class SoftFilterCache
extends AbstractConcurrentMapFilterCache
implements org.elasticsearch.common.collect.MapEvictionListener<org.apache.lucene.search.Filter,DocSet>

A soft reference based filter cache that has soft keys on the IndexReader.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.elasticsearch.index.cache.filter.FilterCache
FilterCache.EntriesStats
 
Field Summary
 
Fields inherited from class org.elasticsearch.index.AbstractIndexComponent
componentSettings, index, indexSettings, logger
 
Constructor Summary
SoftFilterCache(Index index, Settings indexSettings, IndexSettingsService indexSettingsService)
           
 
Method Summary
protected  java.util.concurrent.ConcurrentMap<java.lang.Object,DocSet> buildFilterMap()
           
 void close()
           
 long evictions()
           
 void onEviction(org.apache.lucene.search.Filter filter, DocSet docSet)
           
 java.lang.String type()
           
 
Methods inherited from class org.elasticsearch.index.cache.filter.support.AbstractConcurrentMapFilterCache
buildCache, cache, clear, clear, entriesStats, finished, isCached
 
Methods inherited from class org.elasticsearch.index.AbstractIndexComponent
index, nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.elasticsearch.index.IndexComponent
index
 

Constructor Detail

SoftFilterCache

@Inject
public SoftFilterCache(Index index,
                              @IndexSettings
                              Settings indexSettings,
                              IndexSettingsService indexSettingsService)
Method Detail

close

public void close()
Specified by:
close in interface CloseableComponent
Overrides:
close in class AbstractConcurrentMapFilterCache

buildFilterMap

protected java.util.concurrent.ConcurrentMap<java.lang.Object,DocSet> buildFilterMap()
Overrides:
buildFilterMap in class AbstractConcurrentMapFilterCache

type

public java.lang.String type()
Specified by:
type in interface FilterCache

evictions

public long evictions()
Specified by:
evictions in interface FilterCache

onEviction

public void onEviction(org.apache.lucene.search.Filter filter,
                       DocSet docSet)
Specified by:
onEviction in interface org.elasticsearch.common.collect.MapEvictionListener<org.apache.lucene.search.Filter,DocSet>