Top Description Fields Constructors Methods
org.conscrypt

public abstract Class BufferAllocator

extends Object
Class Inheritance
Annotations
@ExperimentalApi
Imports
java.nio.ByteBuffer

An object responsible for allocation of buffers. This is an extension point to enable buffer pooling within an application.

Field Summary

Modifier and TypeField and Description
private static final BufferAllocator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract AllocatedBuffer
allocateDirectBuffer(int capacity)

Allocates a direct (i.e. non-heap) buffer with the given capacity.

public static BufferAllocator
unpooled()

Returns an unpooled buffer allocator, which will create a new buffer for each request.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

UNPOOLEDback to summary
private static final BufferAllocator UNPOOLED

Constructor Detail

BufferAllocatorback to summary
public BufferAllocator()

Method Detail

allocateDirectBufferback to summary
public abstract AllocatedBuffer allocateDirectBuffer(int capacity)

Allocates a direct (i.e. non-heap) buffer with the given capacity.

unpooledback to summary
public static BufferAllocator unpooled()

Returns an unpooled buffer allocator, which will create a new buffer for each request.