|
XNIO API 3.0.7.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xnio.ByteBufferSlicePool
public final class ByteBufferSlicePool
A buffer pooled allocator. This pool uses a series of buffer regions to back the returned pooled buffers. When the buffer is no longer needed, it should be freed back into the pool; failure to do so will cause the corresponding buffer area to be unavailable until the buffer is garbage-collected.
| Constructor Summary | |
|---|---|
ByteBufferSlicePool(BufferAllocator<ByteBuffer> allocator,
int bufferSize,
int maxRegionSize)
Construct a new instance. |
|
ByteBufferSlicePool(int bufferSize,
int maxRegionSize)
Construct a new instance, using a direct buffer allocator. |
|
| Method Summary | |
|---|---|
Pooled<ByteBuffer> |
allocate()
Allocate a resource from the pool. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public 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 buffer
public ByteBufferSlicePool(int bufferSize,
int maxRegionSize)
bufferSize - the size of each buffermaxRegionSize - the maximum region size for each backing buffer| Method Detail |
|---|
public Pooled<ByteBuffer> allocate()
allocate in interface Pool<ByteBuffer>
|
XNIO API 3.0.7.GA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||