public class LeakTrackingByteBufferPool extends ContainerLifeCycle implements ByteBufferPool
AbstractLifeCycle.AbstractLifeCycleListenerContainer.InheritedListener, Container.ListenerLifeCycle.Listener| Constructor and Description |
|---|
LeakTrackingByteBufferPool(ByteBufferPool delegate) |
| Modifier and Type | Method and Description |
|---|---|
ByteBuffer |
acquire(int size,
boolean direct)
Requests a
ByteBuffer of the given size. |
protected void |
leaked(LeakDetector.LeakInfo leakInfo) |
void |
release(ByteBuffer buffer)
Returns a
ByteBuffer, usually obtained with ByteBufferPool.acquire(int, boolean)
(but not necessarily), making it available for recycling and reuse. |
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic LeakTrackingByteBufferPool(ByteBufferPool delegate)
public ByteBuffer acquire(int size, boolean direct)
ByteBufferPoolRequests a ByteBuffer of the given size.
The returned buffer may have a bigger capacity than the size being requested but it will have the limit set to the given size.
acquire in interface ByteBufferPoolsize - the size of the bufferdirect - whether the buffer must be direct or notByteBufferPool.release(ByteBuffer)public void release(ByteBuffer buffer)
ByteBufferPoolReturns a ByteBuffer, usually obtained with ByteBufferPool.acquire(int, boolean)
(but not necessarily), making it available for recycling and reuse.
release in interface ByteBufferPoolbuffer - the buffer to returnByteBufferPool.acquire(int, boolean)protected void leaked(LeakDetector.LeakInfo leakInfo)
Copyright © 1995-2015 Webtide. All Rights Reserved.