Class DefaultByteBufferPool

java.lang.Object
io.undertow.server.DefaultByteBufferPool
All Implemented Interfaces:
ByteBufferPool, Closeable, AutoCloseable

public class DefaultByteBufferPool extends Object implements ByteBufferPool
A byte buffer pool that supports reference counted pools. TODO: move this somewhere more appropriate
Author:
Stuart Douglas
  • Constructor Details

    • DefaultByteBufferPool

      public DefaultByteBufferPool(boolean direct, int bufferSize)
      Parameters:
      direct - If this implementation should use direct buffers
      bufferSize - The buffer size to use
    • DefaultByteBufferPool

      public DefaultByteBufferPool(boolean direct, int bufferSize, int maximumPoolSize, int threadLocalCacheSize, int leakDecetionPercent)
      Parameters:
      direct - If this implementation should use direct buffers
      bufferSize - The buffer size to use
      maximumPoolSize - The maximum pool size, in number of buffers, it does not include buffers in thread local caches
      threadLocalCacheSize - The maximum number of buffers that can be stored in a thread local cache
    • DefaultByteBufferPool

      public DefaultByteBufferPool(boolean direct, int bufferSize, int maximumPoolSize, int threadLocalCacheSize)
      Parameters:
      direct - If this implementation should use direct buffers
      bufferSize - The buffer size to use
      maximumPoolSize - The maximum pool size, in number of buffers, it does not include buffers in thread local caches
      threadLocalCacheSize - The maximum number of buffers that can be stored in a thread local cache
  • Method Details