DataBufferFactory interface based on a
Netty 5 BufferAllocator.
| Modifier and Type | Field and Description |
|---|---|
| private final BufferAllocator |
| Access | Constructor and Description |
|---|---|
| public | Netty5DataBufferFactory(BufferAllocator
the factory to use bufferAllocator)Create a new |
| Modifier and Type | Method and Description |
|---|---|
| public Netty5DataBuffer | allocateBuffer()
Implements org.
Deprecated
Allocate a data buffer of a default initial capacity. |
| public Netty5DataBuffer | allocateBuffer(int
the initial capacity of the buffer to allocate initialCapacity)Implements org. Allocate a data buffer of the given initial capacity. |
| public BufferAllocator | |
| public boolean | isDirect()
Implements org. Indicates whether this factory allocates direct buffers (i.e. non-heap, native memory). |
| public DataBuffer | join(List<? extends DataBuffer>
the data buffers to be composed dataBuffers)Implements org. Return a new |
| public static Buffer | Returns: the nettyBufferthe buffer)DataBuffer to return a Buffer forReturn the given Netty |
| public String | |
| public Netty5DataBuffer | wrap(ByteBuffer
the NIO byte buffer to wrap byteBuffer)Implements org. Wrap the given |
| public Netty5DataBuffer | wrap(byte[]
the byte array to wrap bytes)Implements org. Wrap the given |
| public Netty5DataBuffer |
| bufferAllocator | back to summary |
|---|---|
| private final BufferAllocator bufferAllocator | |
| Netty5DataBufferFactory | back to summary |
|---|---|
| public Netty5DataBufferFactory(BufferAllocator bufferAllocator) Create a new
| |
| allocateBuffer | back to summary |
|---|---|
| public Netty5DataBuffer allocateBuffer() Implements org. Doc from org. Deprecated
Allocate a data buffer of a default initial capacity. Depending on the underlying implementation and its configuration, this will be heap-based or direct buffer.
| |
| allocateBuffer | back to summary |
|---|---|
| public Netty5DataBuffer allocateBuffer(int initialCapacity) Implements org. Doc from org. Allocate a data buffer of the given initial capacity. Depending on the underlying implementation and its configuration, this will be heap-based or direct buffer.
| |
| getBufferAllocator | back to summary |
|---|---|
| public BufferAllocator getBufferAllocator() Return the | |
| isDirect | back to summary |
|---|---|
| public boolean isDirect() Implements org. Doc from org. Indicates whether this factory allocates direct buffers (i.e. non-heap, native memory).
| |
| join | back to summary |
|---|---|
| public DataBuffer join(List<? extends DataBuffer> dataBuffers) Implements org. Doc from org. Return a new Note that the given data buffers do not have to be released, as they are released as part of the returned composite. This implementation uses Netty's
| |
| toBuffer | back to summary |
|---|---|
| public static Buffer toBuffer(DataBuffer buffer) Return the given Netty Returns the native buffer
if
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| wrap | back to summary |
|---|---|
| public Netty5DataBuffer wrap(ByteBuffer byteBuffer) Implements org. Doc from org. Wrap the given
| |
| wrap | back to summary |
|---|---|
| public Netty5DataBuffer wrap(byte[] bytes) Implements org. Doc from org. Wrap the given
| |
| wrap | back to summary |
|---|---|
| public Netty5DataBuffer wrap(Buffer buffer) Wrap the given Netty
| |