@ExperimentalApi public abstract class AllocatedBuffer extends Object
BufferAllocator.| Constructor and Description |
|---|
AllocatedBuffer() |
| Modifier and Type | Method and Description |
|---|---|
abstract ByteBuffer |
nioBuffer()
Returns the
ByteBuffer that backs this buffer. |
abstract AllocatedBuffer |
release()
Decreases the reference count by
1 and deallocates this object if the reference count
reaches at 0. |
abstract AllocatedBuffer |
retain()
Increases the reference count by
1. |
static AllocatedBuffer |
wrap(ByteBuffer buffer)
Creates a new
AllocatedBuffer that is backed by the given ByteBuffer. |
public abstract ByteBuffer nioBuffer()
ByteBuffer that backs this buffer.public abstract AllocatedBuffer retain()
1.public abstract AllocatedBuffer release()
1 and deallocates this object if the reference count
reaches at 0.true if and only if the reference count became 0 and this object has
been deallocatedpublic static AllocatedBuffer wrap(ByteBuffer buffer)
AllocatedBuffer that is backed by the given ByteBuffer.