org.elasticsearch.index.cache.filter.weighted
Class WeightedFilterCache

java.lang.Object
  extended by org.elasticsearch.index.AbstractIndexComponent
      extended by org.elasticsearch.index.cache.filter.weighted.WeightedFilterCache
All Implemented Interfaces:
com.google.common.cache.RemovalListener<WeightedFilterCache.FilterCacheKey,DocSet>, org.apache.lucene.index.SegmentReader.CoreClosedListener, CloseableComponent, FilterCache, IndexComponent

public class WeightedFilterCache
extends AbstractIndexComponent
implements FilterCache, org.apache.lucene.index.SegmentReader.CoreClosedListener, com.google.common.cache.RemovalListener<WeightedFilterCache.FilterCacheKey,DocSet>


Nested Class Summary
static class WeightedFilterCache.FilterCacheKey
           
static class WeightedFilterCache.FilterCacheValueWeigher
           
 
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
WeightedFilterCache(Index index, Settings indexSettings, IndicesFilterCache indicesFilterCache)
           
 
Method Summary
 org.apache.lucene.search.Filter cache(org.apache.lucene.search.Filter filterToCache)
           
 void clear(org.apache.lucene.index.IndexReader reader)
           
 void clear(String reason)
           
 void close()
           
 FilterCache.EntriesStats entriesStats()
           
 long evictions()
           
 boolean isCached(org.apache.lucene.search.Filter filter)
           
 void onClose(org.apache.lucene.index.SegmentReader owner)
           
 void onRemoval(com.google.common.cache.RemovalNotification<WeightedFilterCache.FilterCacheKey,DocSet> removalNotification)
           
 String type()
           
 
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

WeightedFilterCache

@Inject
public WeightedFilterCache(Index index,
                                  @IndexSettings
                                  Settings indexSettings,
                                  IndicesFilterCache indicesFilterCache)
Method Detail

type

public String type()
Specified by:
type in interface FilterCache

close

public void close()
           throws ElasticSearchException
Specified by:
close in interface CloseableComponent
Throws:
ElasticSearchException

clear

public void clear(String reason)
Specified by:
clear in interface FilterCache

onClose

public void onClose(org.apache.lucene.index.SegmentReader owner)
Specified by:
onClose in interface org.apache.lucene.index.SegmentReader.CoreClosedListener

clear

public void clear(org.apache.lucene.index.IndexReader reader)
Specified by:
clear in interface FilterCache

entriesStats

public FilterCache.EntriesStats entriesStats()
Specified by:
entriesStats in interface FilterCache

evictions

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

cache

public org.apache.lucene.search.Filter cache(org.apache.lucene.search.Filter filterToCache)
Specified by:
cache in interface FilterCache

isCached

public boolean isCached(org.apache.lucene.search.Filter filter)
Specified by:
isCached in interface FilterCache

onRemoval

public void onRemoval(com.google.common.cache.RemovalNotification<WeightedFilterCache.FilterCacheKey,DocSet> removalNotification)
Specified by:
onRemoval in interface com.google.common.cache.RemovalListener<WeightedFilterCache.FilterCacheKey,DocSet>


Copyright © 2009-2012. All Rights Reserved.