Class MappedByteBufferPool

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

@ManagedObject public class MappedByteBufferPool extends AbstractByteBufferPool

A ByteBuffer pool where ByteBuffers are held in queues that are held in a Map.

Given a capacity factor of 1024, the Map entry with key 1 holds a queue of ByteBuffers each of capacity 1024, the Map entry with key 2 holds a queue of ByteBuffers each of capacity 2048, and so on.

  • Field Details

  • Constructor Details

    • MappedByteBufferPool

      public MappedByteBufferPool()
      Creates a new MappedByteBufferPool with a default configuration.
    • MappedByteBufferPool

      public MappedByteBufferPool(int factor)
      Creates a new MappedByteBufferPool with the given capacity factor.
      Parameters:
      factor - the capacity factor
    • MappedByteBufferPool

      public MappedByteBufferPool(int factor, int maxQueueLength)
      Creates a new MappedByteBufferPool with the given configuration.
      Parameters:
      factor - the capacity factor
      maxQueueLength - the maximum ByteBuffer queue length
    • MappedByteBufferPool

      public MappedByteBufferPool(int factor, int maxQueueLength, Function<Integer,ByteBufferPool.Bucket> newBucket)
      Creates a new MappedByteBufferPool with the given configuration.
      Parameters:
      factor - the capacity factor
      maxQueueLength - the maximum ByteBuffer queue length
      newBucket - the function that creates a Bucket
    • MappedByteBufferPool

      public MappedByteBufferPool(int factor, int maxQueueLength, Function<Integer,ByteBufferPool.Bucket> newBucket, long maxHeapMemory, long maxDirectMemory)
      Creates a new MappedByteBufferPool with the given configuration.
      Parameters:
      factor - the capacity factor
      maxQueueLength - the maximum ByteBuffer queue length
      newBucket - the function that creates a Bucket
      maxHeapMemory - the max heap memory in bytes
      maxDirectMemory - the max direct memory in bytes
  • Method Details