org.elasticsearch.cache.memory
Class ByteBufferCache

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.cache.memory.ByteBufferCache

public class ByteBufferCache
extends AbstractComponent


Field Summary
static boolean CLEAN_SUPPORTED
           
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
ByteBufferCache()
           
ByteBufferCache(int bufferSizeInBytes, int cacheSizeInBytes, boolean direct, boolean warmCache)
           
ByteBufferCache(Settings settings)
           
 
Method Summary
 java.nio.ByteBuffer acquireBuffer()
           
 ByteSizeValue allocatedMemory()
           
 ByteSizeValue bufferSize()
           
 int bufferSizeInBytes()
           
 ByteSizeValue cacheSize()
           
 void close()
           
 boolean direct()
           
 void releaseBuffer(java.nio.ByteBuffer byteBuffer)
           
 
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
 

Field Detail

CLEAN_SUPPORTED

public static final boolean CLEAN_SUPPORTED
Constructor Detail

ByteBufferCache

public ByteBufferCache()

ByteBufferCache

public ByteBufferCache(int bufferSizeInBytes,
                       int cacheSizeInBytes,
                       boolean direct,
                       boolean warmCache)

ByteBufferCache

@Inject
public ByteBufferCache(Settings settings)
Method Detail

bufferSize

public ByteSizeValue bufferSize()

cacheSize

public ByteSizeValue cacheSize()

allocatedMemory

public ByteSizeValue allocatedMemory()

bufferSizeInBytes

public int bufferSizeInBytes()

direct

public boolean direct()

close

public void close()

acquireBuffer

public java.nio.ByteBuffer acquireBuffer()

releaseBuffer

public void releaseBuffer(java.nio.ByteBuffer byteBuffer)