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 ByteBufferPool
public boolean isDirect()
isDirect
in interface ByteBufferPool
public PooledByteBuffer allocate()
allocate
in interface ByteBufferPool
public ByteBufferPool getArrayBackedPool()
ByteBufferPool
getArrayBackedPool
in interface ByteBufferPool
public void close()
close
in interface ByteBufferPool
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2020 JBoss by Red Hat. All rights reserved.