java.lang.Object
org.eclipse.jetty.io.ArrayRetainableByteBufferPool
- All Implemented Interfaces:
RetainableByteBufferPool,org.eclipse.jetty.util.component.Dumpable
@ManagedObject
public class ArrayRetainableByteBufferPool
extends Object
implements RetainableByteBufferPool, org.eclipse.jetty.util.component.Dumpable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
org.eclipse.jetty.util.component.Dumpable.DumpableContainer -
Field Summary
Fields inherited from interface org.eclipse.jetty.util.component.Dumpable
KEY -
Constructor Summary
ConstructorsModifierConstructorDescriptionArrayRetainableByteBufferPool(int minCapacity, int factor, int maxCapacity, int maxBucketSize) ArrayRetainableByteBufferPool(int minCapacity, int factor, int maxCapacity, int maxBucketSize, long maxHeapMemory, long maxDirectMemory) protectedArrayRetainableByteBufferPool(int minCapacity, int factor, int maxCapacity, int maxBucketSize, long maxHeapMemory, long maxDirectMemory, Function<Integer, Integer> bucketIndexFor, Function<Integer, Integer> bucketCapacity) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.jetty.util.component.Dumpable
dump, dumpSelf
-
Constructor Details
-
ArrayRetainableByteBufferPool
public ArrayRetainableByteBufferPool() -
ArrayRetainableByteBufferPool
public ArrayRetainableByteBufferPool(int minCapacity, int factor, int maxCapacity, int maxBucketSize) -
ArrayRetainableByteBufferPool
public ArrayRetainableByteBufferPool(int minCapacity, int factor, int maxCapacity, int maxBucketSize, long maxHeapMemory, long maxDirectMemory) -
ArrayRetainableByteBufferPool
-
-
Method Details
-
getMinCapacity
@ManagedAttribute("The minimum pooled buffer capacity") public int getMinCapacity() -
getMaxCapacity
@ManagedAttribute("The maximum pooled buffer capacity") public int getMaxCapacity() -
acquire
Description copied from interface:RetainableByteBufferPoolAcquires a memory buffer from the pool.- Specified by:
acquirein interfaceRetainableByteBufferPool- 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.
-
getDirectByteBufferCount
@ManagedAttribute("The number of pooled direct ByteBuffers") public long getDirectByteBufferCount() -
getHeapByteBufferCount
@ManagedAttribute("The number of pooled heap ByteBuffers") public long getHeapByteBufferCount() -
getAvailableDirectByteBufferCount
@ManagedAttribute("The number of pooled direct ByteBuffers that are available") public long getAvailableDirectByteBufferCount() -
getAvailableHeapByteBufferCount
@ManagedAttribute("The number of pooled heap ByteBuffers that are available") public long getAvailableHeapByteBufferCount() -
getDirectMemory
@ManagedAttribute("The bytes retained by direct ByteBuffers") public long getDirectMemory() -
getHeapMemory
@ManagedAttribute("The bytes retained by heap ByteBuffers") public long getHeapMemory() -
getAvailableDirectMemory
@ManagedAttribute("The available bytes retained by direct ByteBuffers") public long getAvailableDirectMemory() -
getAvailableHeapMemory
@ManagedAttribute("The available bytes retained by heap ByteBuffers") public long getAvailableHeapMemory() -
clear
@ManagedOperation(value="Clears this RetainableByteBufferPool", impact="ACTION") public void clear() -
toString
-
dump
- Specified by:
dumpin interfaceorg.eclipse.jetty.util.component.Dumpable- Throws:
IOException
-