org.elasticsearch.indices.memory
Class IndicesMemoryCleaner

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.indices.memory.IndicesMemoryCleaner

public class IndicesMemoryCleaner
extends AbstractComponent


Nested Class Summary
static class IndicesMemoryCleaner.MemoryCleanResult
           
static class IndicesMemoryCleaner.TranslogCleanResult
           
 
Field Summary
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
IndicesMemoryCleaner(Settings settings, IndicesService indicesService)
           
 
Method Summary
 void cacheClear()
           
 void cacheClearUnreferenced()
           
 IndicesMemoryCleaner.MemoryCleanResult cleanMemory(long memoryToClean, ByteSizeValue minimumFlushableSizeToClean)
          Checks if memory needs to be cleaned and cleans it.
 IndicesMemoryCleaner.TranslogCleanResult cleanTranslog(int translogNumberOfOperationsThreshold)
           
 void forceCleanMemory(java.util.Set<ShardId> shardsToIgnore)
           
 void fullMemoryClean()
           
 
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndicesMemoryCleaner

@Inject
public IndicesMemoryCleaner(Settings settings,
                                   IndicesService indicesService)
Method Detail

cleanTranslog

public IndicesMemoryCleaner.TranslogCleanResult cleanTranslog(int translogNumberOfOperationsThreshold)

cacheClearUnreferenced

public void cacheClearUnreferenced()

cacheClear

public void cacheClear()

fullMemoryClean

public void fullMemoryClean()

forceCleanMemory

public void forceCleanMemory(java.util.Set<ShardId> shardsToIgnore)

cleanMemory

public IndicesMemoryCleaner.MemoryCleanResult cleanMemory(long memoryToClean,
                                                          ByteSizeValue minimumFlushableSizeToClean)
Checks if memory needs to be cleaned and cleans it. Returns the amount of memory cleaned.