Class ArrayByteBufferPool.Tracking
java.lang.Object
org.eclipse.jetty.io.ArrayByteBufferPool
org.eclipse.jetty.io.ArrayByteBufferPool.Tracking
- All Implemented Interfaces:
 ByteBufferPool, Dumpable
- Enclosing class:
 ArrayByteBufferPool
A variant of ArrayByteBufferPool that tracks buffer
acquires/releases, useful to identify buffer leaks.
Use getLeaks() when the system is idle to get
the ArrayByteBufferPool.Tracking.TrackedBuffers 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 ArrayByteBufferPool
ArrayByteBufferPool.Quadratic, ArrayByteBufferPool.Tracking, ArrayByteBufferPool.WithBucketCapacitiesNested classes/interfaces inherited from interface ByteBufferPool
ByteBufferPool.Accumulator, ByteBufferPool.NonPooling, ByteBufferPool.Sized, ByteBufferPool.WrapperNested classes/interfaces inherited from interface Dumpable
Dumpable.DumpableContainer, Dumpable.DumpAppendable - 
Field Summary
Fields inherited from interface ByteBufferPool
NON_POOLING, SIZED_NON_POOLING - 
Constructor Summary
ConstructorsConstructorDescriptionTracking()Tracking(int minCapacity, int maxCapacity, int maxBucketSize) 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 maxCapacity, int maxBucketSize, long maxHeapMemory, long maxDirectMemory)  - 
Method Summary
Modifier and TypeMethodDescriptionacquire(int size, boolean direct) Acquires aRetainableByteBufferfrom this pool.getLeaks()Methods inherited from class ArrayByteBufferPool
clear, dump, getAvailableDirectByteBufferCount, getAvailableDirectMemory, getAvailableHeapByteBufferCount, getAvailableHeapMemory, getDirectBucketsStatistics, getDirectByteBufferCount, getDirectMemory, getHeapBucketsStatistics, getHeapByteBufferCount, getHeapMemory, getMaxCapacity, getMinCapacity, getNoBucketDirectAcquires, getNoBucketHeapAcquires, getReserved, isStatisticsEnabled, poolFor, setStatisticsEnabled, toString 
- 
Constructor Details
- 
Tracking
public Tracking() - 
Tracking
public Tracking(int minCapacity, int maxCapacity, int maxBucketSize)  - 
Tracking
public Tracking(int minCapacity, int factor, int maxCapacity, int maxBucketSize)  - 
Tracking
public Tracking(int minCapacity, int maxCapacity, int maxBucketSize, long maxHeapMemory, long maxDirectMemory)  - 
Tracking
public Tracking(int minCapacity, int factor, int maxCapacity, int maxBucketSize, long maxHeapMemory, long maxDirectMemory)  
 - 
 - 
Method Details
- 
acquire
Description copied from interface:ByteBufferPoolAcquires a
RetainableByteBufferfrom this pool.- Specified by:
 acquirein interfaceByteBufferPool- Overrides:
 acquirein classArrayByteBufferPool- 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 
RetainableByteBufferwith position and limit set to 0. 
 - 
getLeaks
 - 
dumpLeaks
 
 -