ByteBufferPool, Container, Destroyable, Dumpable, LifeCyclepublic class LeakTrackingByteBufferPool extends ContainerLifeCycle implements ByteBufferPool
AbstractLifeCycle.AbstractLifeCycleListenerByteBufferPool.Bucket, ByteBufferPool.LeaseContainer.InheritedListener, Container.ListenerLifeCycle.ListenerFAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING| Constructor | Description |
|---|---|
LeakTrackingByteBufferPool(ByteBufferPool delegate) |
| Modifier and Type | Method | Description |
|---|---|---|
java.nio.ByteBuffer |
acquire(int size,
boolean direct) |
Requests a
ByteBuffer of the given size. |
void |
clearTracking() |
|
long |
getLeakedAcquires() |
|
long |
getLeakedReleases() |
|
long |
getLeakedResources() |
|
protected void |
leaked(LeakDetector.LeakInfo leakInfo) |
|
void |
release(java.nio.ByteBuffer buffer) |
Returns a
ByteBuffer, usually obtained with ByteBufferPool.acquire(int, boolean)
(but not necessarily), making it available for recycling and reuse. |
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopnewByteBufferaddBean, addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, doStop, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeanspublic LeakTrackingByteBufferPool(ByteBufferPool delegate)
public java.nio.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(java.nio.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)public void clearTracking()
public long getLeakedAcquires()
public long getLeakedReleases()
public long getLeakedResources()
protected void leaked(LeakDetector.LeakInfo leakInfo)
Copyright © 1995–2018 Webtide. All rights reserved.