Class AbstractByteBufferPool

java.lang.Object
org.eclipse.jetty.io.AbstractByteBufferPool
All Implemented Interfaces:
ByteBufferPool
Direct Known Subclasses:
ArrayByteBufferPool, MappedByteBufferPool

@ManagedObject abstract class AbstractByteBufferPool extends Object implements ByteBufferPool
  • Field Details

    • _factor

      private final int _factor
    • _maxQueueLength

      private final int _maxQueueLength
    • _maxHeapMemory

      private final long _maxHeapMemory
    • _heapMemory

      private final AtomicLong _heapMemory
    • _maxDirectMemory

      private final long _maxDirectMemory
    • _directMemory

      private final AtomicLong _directMemory
  • Constructor Details

    • AbstractByteBufferPool

      protected AbstractByteBufferPool(int factor, int maxQueueLength, long maxHeapMemory, long maxDirectMemory)
  • Method Details

    • getCapacityFactor

      protected int getCapacityFactor()
    • getMaxQueueLength

      protected int getMaxQueueLength()
    • decrementMemory

      protected void decrementMemory(ByteBuffer buffer)
    • incrementMemory

      protected void incrementMemory(ByteBuffer buffer)
    • updateMemory

      private void updateMemory(ByteBuffer buffer, boolean addOrSub)
    • releaseExcessMemory

      protected void releaseExcessMemory(boolean direct, Consumer<Boolean> clearFn)
    • getDirectMemory

      @ManagedAttribute("The bytes retained by direct ByteBuffers") public long getDirectMemory()
    • getHeapMemory

      @ManagedAttribute("The bytes retained by heap ByteBuffers") public long getHeapMemory()
    • getMemory

      public long getMemory(boolean direct)
    • clear

      @ManagedOperation(value="Clears this ByteBufferPool", impact="ACTION") public void clear()