public final class ByteBufferSlicePool extends Object implements Pool<ByteBuffer>
Constructor and Description |
---|
ByteBufferSlicePool(BufferAllocator<ByteBuffer> allocator,
int bufferSize,
int maxRegionSize)
Construct a new instance.
|
ByteBufferSlicePool(BufferAllocator<ByteBuffer> allocator,
int bufferSize,
int maxRegionSize,
int threadLocalQueueSize)
Construct a new instance.
|
ByteBufferSlicePool(int bufferSize,
int maxRegionSize)
Construct a new instance, using a direct buffer allocator.
|
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>
Copyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.