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() |
ByteBufferPool | getArrayBackedPool() If this byte buffer pool corresponds to an array backed pool then this will return itself. |
int | getBufferSize() |
boolean | isDirect() |
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 boolean isDirect()
isDirect in interface ByteBufferPoolpublic PooledByteBuffer allocate()
allocate in interface ByteBufferPoolpublic ByteBufferPool getArrayBackedPool()
ByteBufferPoolgetArrayBackedPool in interface ByteBufferPoolpublic void close()
close in interface ByteBufferPoolclose in interface Closeableclose in interface AutoCloseableCopyright © 2020 JBoss by Red Hat. All rights reserved.