Abstract implementation of RetainableByteBuffer with
reference counting.
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBuffer | |
| private final Retainable. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public boolean | canRetain()
Overrides default org. Returns whether this resource is referenced counted by calls to |
| public ByteBuffer | getByteBuffer()
Implements org. Get the wrapped, not |
| public boolean | |
| public boolean | release()
Overrides default org. Releases this resource, potentially decrementing a reference count (if any). |
| public void | retain()
Overrides default org. Retains this resource, potentially incrementing a reference count if there are resources that will be released. |
| public String |
| byteBuffer | back to summary |
|---|---|
| private final ByteBuffer byteBuffer | |
| refCount | back to summary |
|---|---|
| private final Retainable. | |
| AbstractRetainableByteBuffer | back to summary |
|---|---|
| public AbstractRetainableByteBuffer(ByteBuffer byteBuffer) | |
| acquire | back to summary |
|---|---|
protected void acquire()
| |
| canRetain | back to summary |
|---|---|
| public boolean canRetain() Overrides default org. Doc from org. Returns whether this resource is referenced counted by calls to Implementations may decide that special resources are not not referenced counted (for example,
| |
| getByteBuffer | back to summary |
|---|---|
| public ByteBuffer getByteBuffer() Implements org. Doc from org. Get the wrapped, not
| |
| isRetained | back to summary |
|---|---|
| public boolean isRetained() Implements org.
| |
| release | back to summary |
|---|---|
| public boolean release() Overrides default org. Doc from org. Releases this resource, potentially decrementing a reference count (if any).
| |
| retain | back to summary |
|---|---|
| public void retain() Overrides default org. Doc from org. Retains this resource, potentially incrementing a reference count if there are resources that will be released.
| |
| 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- | |