ch.bind.philib.pool.buffer
public final class ByteBufferPool extends Object implements Pool<ByteBuffer>
| Constructor and Description |
|---|
ByteBufferPool(Pool<ByteBuffer> backend) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
instructs the pool to destroy all pooled objects.
|
static ByteBufferPool |
create(int bufferSize,
int maxEntries) |
static ByteBufferPool |
create(int bufferSize,
int maxEntries,
int concurrencyLevel) |
int |
getNumPooled() |
PoolStats |
getPoolStats() |
void |
recycle(ByteBuffer value)
Recycles an object which might be reused.
|
ByteBuffer |
take()
Take an object from the object-pool.
|
public ByteBufferPool(Pool<ByteBuffer> backend)
public final ByteBuffer take()
Pooltake in interface Pool<ByteBuffer>public final void recycle(ByteBuffer value)
Poolrecycle in interface Pool<ByteBuffer>value - The object to be recycled.public final PoolStats getPoolStats()
getPoolStats in interface Pool<ByteBuffer>public int getNumPooled()
getNumPooled in interface Pool<ByteBuffer>public void clear()
Poolclear in interface Pool<ByteBuffer>public static ByteBufferPool create(int bufferSize, int maxEntries)
public static ByteBufferPool create(int bufferSize, int maxEntries, int concurrencyLevel)
Copyright © 2014. All Rights Reserved.