Top Fields Constructors Methods
io.vertx.core.buffer.impl

public abstract Class VertxByteBufAllocator

extends AbstractByteBufAllocator
Class Inheritance
Imports
io.netty.buffer.AbstractByteBufAllocator, .ByteBuf, .ByteBufAllocator, .PooledByteBufAllocator, .UnpooledByteBufAllocator, io.netty.util.internal.PlatformDependent

Field Summary

Modifier and TypeField and Description
public static final VertxByteBufAllocator
DEFAULT

Hides io.netty.buffer.ByteBufAllocator.DEFAULT.

Vert.x shared unpooled heap buffers allocator.
private static final VertxByteBufAllocator
public static final ByteBufAllocator
POOLED_ALLOCATOR

Vert.x pooled allocator.

private static final boolean
public static final ByteBufAllocator
UNPOOLED_ALLOCATOR

Vert.x shared unpooled allocator.

private static final VertxByteBufAllocator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
protected ByteBuf
newDirectBuffer(int initialCapacity, int maxCapacity)

Implements abstract io.netty.buffer.AbstractByteBufAllocator.newDirectBuffer.

Create a direct ByteBuf with the given initialCapacity and maxCapacity.

Inherited from io.netty.buffer.AbstractByteBufAllocator:
bufferbufferbuffercalculateNewCapacitycompositeBuffercompositeBuffercompositeDirectBuffercompositeDirectBuffercompositeHeapBuffercompositeHeapBufferdirectBufferdirectBufferdirectBufferheapBufferheapBufferheapBufferioBufferioBufferioBuffernewHeapBuffertoLeakAwareBuffertoLeakAwareBuffertoString

Field Detail

DEFAULTback to summary
public static final VertxByteBufAllocator DEFAULT

Hides io.netty.buffer.ByteBufAllocator.DEFAULT.

Vert.x shared unpooled heap buffers allocator.
Differently from UNPOOLED_ALLOCATOR, its buffers are not reference-counted and array-backed.

IMPLback to summary
private static final VertxByteBufAllocator IMPL
POOLED_ALLOCATORback to summary
public static final ByteBufAllocator POOLED_ALLOCATOR

Vert.x pooled allocator. It should prefers direct buffers, unless PlatformDependent#hasUnsafe() is false.

REUSE_NETTY_ALLOCATORback to summary
private static final boolean REUSE_NETTY_ALLOCATOR
UNPOOLED_ALLOCATORback to summary
public static final ByteBufAllocator UNPOOLED_ALLOCATOR

Vert.x shared unpooled allocator. It prefers non-direct buffers.

UNSAFE_IMPLback to summary
private static final VertxByteBufAllocator UNSAFE_IMPL

Constructor Detail

VertxByteBufAllocatorback to summary
public VertxByteBufAllocator()

Method Detail

isDirectBufferPooledback to summary
public boolean isDirectBufferPooled()

Implements io.netty.buffer.ByteBufAllocator.isDirectBufferPooled.

Doc from io.netty.buffer.ByteBufAllocator.isDirectBufferPooled.

Returns true if direct ByteBuf's are pooled

Annotations
@Override
newDirectBufferback to summary
protected ByteBuf newDirectBuffer(int initialCapacity, int maxCapacity)

Implements abstract io.netty.buffer.AbstractByteBufAllocator.newDirectBuffer.

Doc from io.netty.buffer.AbstractByteBufAllocator.newDirectBuffer.

Create a direct ByteBuf with the given initialCapacity and maxCapacity.

Annotations
@Override