Package org.conscrypt

Class BufferAllocator

java.lang.Object
org.conscrypt.BufferAllocator

@ExperimentalApi public abstract class BufferAllocator extends Object
An object responsible for allocation of buffers. This is an extension point to enable buffer pooling within an application.
  • Field Details

  • Constructor Details

    • BufferAllocator

      public BufferAllocator()
  • Method Details

    • unpooled

      public static BufferAllocator unpooled()
      Returns an unpooled buffer allocator, which will create a new buffer for each request.
    • allocateDirectBuffer

      public abstract AllocatedBuffer allocateDirectBuffer(int capacity)
      Allocates a direct (i.e. non-heap) buffer with the given capacity.