ByteBufferPool.public final class ByteBufferSlicePool extends Object implements Pool<ByteBuffer>
| Constructor and Description |
|---|
ByteBufferSlicePool(BufferAllocator<ByteBuffer> allocator,
int bufferSize,
int maxRegionSize)
Deprecated.
Construct a new instance.
|
ByteBufferSlicePool(BufferAllocator<ByteBuffer> allocator,
int bufferSize,
int maxRegionSize,
int threadLocalQueueSize)
Deprecated.
Construct a new instance.
|
ByteBufferSlicePool(int bufferSize,
int maxRegionSize)
Deprecated.
Construct a new instance, using a direct buffer allocator.
|
| Modifier and Type | Method and Description |
|---|---|
Pooled<ByteBuffer> |
allocate()
Deprecated.
Allocate a resource from the pool.
|
int |
getBufferSize()
Deprecated.
Return the size of the
ByteBuffers that are returned by allocate(). |
public ByteBufferSlicePool(BufferAllocator<ByteBuffer> allocator, int bufferSize, int maxRegionSize, int threadLocalQueueSize)
allocator - the buffer allocator to usebufferSize - the size of each buffermaxRegionSize - the maximum region size for each backing bufferthreadLocalQueueSize - the number of buffers to cache on each threadpublic ByteBufferSlicePool(BufferAllocator<ByteBuffer> allocator, int bufferSize, int maxRegionSize)
allocator - the buffer allocator to usebufferSize - the size of each buffermaxRegionSize - the maximum region size for each backing bufferpublic ByteBufferSlicePool(int bufferSize,
int maxRegionSize)
bufferSize - the size of each buffermaxRegionSize - the maximum region size for each backing bufferpublic Pooled<ByteBuffer> allocate()
allocate in interface Pool<ByteBuffer>public int getBufferSize()
ByteBuffers that are returned by allocate().Copyright © 2017 JBoss by Red Hat. All rights reserved.