Package org.eclipse.jetty.io
Class ArrayRetainableByteBufferPool.Tracking
java.lang.Object
org.eclipse.jetty.io.ArrayRetainableByteBufferPool
org.eclipse.jetty.io.ArrayRetainableByteBufferPool.Tracking
- All Implemented Interfaces:
RetainableByteBufferPool
,Dumpable
- Enclosing class:
- ArrayRetainableByteBufferPool
A variant of ArrayRetainableByteBufferPool
that tracks buffer
acquires/releases, useful to identify buffer leaks.
Use getLeaks()
when the system is idle to get
the ArrayRetainableByteBufferPool.Tracking.Buffer
s that have been leaked, which contain
the stack trace information of where the buffer was acquired.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.eclipse.jetty.io.ArrayRetainableByteBufferPool
ArrayRetainableByteBufferPool.Tracking
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.RetainableByteBufferPool
RetainableByteBufferPool.NotRetainedByteBufferPool
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTracking()
Tracking
(int minCapacity, int factor, int maxCapacity, int maxBucketSize) Tracking
(int minCapacity, int factor, int maxCapacity, int maxBucketSize, long maxHeapMemory, long maxDirectMemory) Tracking
(int minCapacity, int factor, int maxCapacity, int maxBucketSize, IntUnaryOperator bucketIndexFor, IntUnaryOperator bucketCapacity, long maxHeapMemory, long maxDirectMemory) -
Method Summary
Methods inherited from class org.eclipse.jetty.io.ArrayRetainableByteBufferPool
allocate, allocateDirect, clear, dump, getAvailableDirectByteBufferCount, getAvailableDirectMemory, getAvailableHeapByteBufferCount, getAvailableHeapMemory, getDirectByteBufferCount, getDirectMemory, getHeapByteBufferCount, getHeapMemory, getMaxCapacity, getMinCapacity, poolFor, removed, toString
-
Constructor Details
-
Tracking
public Tracking() -
Tracking
public Tracking(int minCapacity, int factor, int maxCapacity, int maxBucketSize) -
Tracking
public Tracking(int minCapacity, int factor, int maxCapacity, int maxBucketSize, long maxHeapMemory, long maxDirectMemory) -
Tracking
public Tracking(int minCapacity, int factor, int maxCapacity, int maxBucketSize, IntUnaryOperator bucketIndexFor, IntUnaryOperator bucketCapacity, long maxHeapMemory, long maxDirectMemory)
-
-
Method Details
-
acquire
Description copied from interface:RetainableByteBufferPool
Acquires a memory buffer from the pool.- Specified by:
acquire
in interfaceRetainableByteBufferPool
- Overrides:
acquire
in classArrayRetainableByteBufferPool
- Parameters:
size
- The size of the buffer. The returned buffer will have at least this capacity.direct
- true if a direct memory buffer is needed, false otherwise.- Returns:
- a memory buffer with position and size set to 0.
-
getLeaks
-
dumpLeaks
-