org.elasticsearch.index.cache.field.data.support
Class AbstractConcurrentMapFieldDataCache

java.lang.Object
  extended by org.elasticsearch.index.AbstractIndexComponent
      extended by org.elasticsearch.index.cache.field.data.support.AbstractConcurrentMapFieldDataCache
All Implemented Interfaces:
org.apache.lucene.index.SegmentReader.CoreClosedListener, CloseableComponent, FieldDataCache, IndexComponent
Direct Known Subclasses:
ResidentFieldDataCache, SoftFieldDataCache

public abstract class AbstractConcurrentMapFieldDataCache
extends AbstractIndexComponent
implements FieldDataCache, org.apache.lucene.index.SegmentReader.CoreClosedListener


Field Summary
 
Fields inherited from class org.elasticsearch.index.AbstractIndexComponent
componentSettings, index, indexSettings, logger
 
Constructor Summary
protected AbstractConcurrentMapFieldDataCache(Index index, Settings indexSettings)
           
 
Method Summary
protected abstract  com.google.common.cache.Cache<String,FieldData> buildFieldDataMap()
           
 FieldData cache(FieldDataType type, org.apache.lucene.index.IndexReader reader, String fieldName)
           
 void clear(org.apache.lucene.index.IndexReader reader)
           
 void clear(String reason)
           
 void clear(String reason, String fieldName)
           
 void close()
           
 void onClose(org.apache.lucene.index.SegmentReader owner)
           
 long sizeInBytes()
           
 long sizeInBytes(String fieldName)
           
 
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.cache.field.data.FieldDataCache
evictions, type
 
Methods inherited from interface org.elasticsearch.index.IndexComponent
index
 

Constructor Detail

AbstractConcurrentMapFieldDataCache

protected AbstractConcurrentMapFieldDataCache(Index index,
                                              @IndexSettings
                                              Settings indexSettings)
Method Detail

close

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

clear

public void clear(String reason,
                  String fieldName)
Specified by:
clear in interface FieldDataCache

clear

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

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 FieldDataCache

sizeInBytes

public long sizeInBytes()
Specified by:
sizeInBytes in interface FieldDataCache

sizeInBytes

public long sizeInBytes(String fieldName)
Specified by:
sizeInBytes in interface FieldDataCache

cache

public FieldData cache(FieldDataType type,
                       org.apache.lucene.index.IndexReader reader,
                       String fieldName)
                throws IOException
Specified by:
cache in interface FieldDataCache
Throws:
IOException

buildFieldDataMap

protected abstract com.google.common.cache.Cache<String,FieldData> buildFieldDataMap()


Copyright © 2009-2012. All Rights Reserved.