public class DefaultByteBufferPool extends Object implements ByteBufferPool
| Constructor and Description |
|---|
DefaultByteBufferPool(boolean direct, int bufferSize) |
DefaultByteBufferPool(boolean direct, int bufferSize, int maximumPoolSize, int threadLocalCacheSize) |
DefaultByteBufferPool(boolean direct, int bufferSize, int maximumPoolSize, int threadLocalCacheSize, int leakDecetionPercent) |
| Modifier and Type | Method and Description |
|---|---|
PooledByteBuffer | allocate() |
void | close() |
protected void | finalize() |
int | getBufferSize() |
public DefaultByteBufferPool(boolean direct,
int bufferSize) direct - If this implementation should use direct buffersbufferSize - The buffer size to usepublic DefaultByteBufferPool(boolean direct,
int bufferSize,
int maximumPoolSize,
int threadLocalCacheSize,
int leakDecetionPercent) direct - If this implementation should use direct buffersbufferSize - The buffer size to usemaximumPoolSize - The maximum pool size, in number of buffers, it does not include buffers in thread local cachesthreadLocalCacheSize - The maximum number of buffers that can be stored in a thread local cachepublic DefaultByteBufferPool(boolean direct,
int bufferSize,
int maximumPoolSize,
int threadLocalCacheSize) direct - If this implementation should use direct buffersbufferSize - The buffer size to usemaximumPoolSize - The maximum pool size, in number of buffers, it does not include buffers in thread local cachesthreadLocalCacheSize - The maximum number of buffers that can be stored in a thread local cachepublic int getBufferSize()
getBufferSize in interface ByteBufferPoolpublic PooledByteBuffer allocate()
allocate in interface ByteBufferPoolpublic void close()
close in interface ByteBufferPoolclose in interface Closeableclose in interface AutoCloseableCopyright © 2015 JBoss by Red Hat. All rights reserved.