public abstract class ByteBufferReference
extends java.lang.Object
| Constructor and Description |
|---|
ByteBufferReference() |
| Modifier and Type | Method and Description |
|---|---|
abstract java.nio.ByteBuffer |
getBuffer()
Return the data as a ByteBuffer.
|
abstract java.nio.ByteBuffer |
getBufferRetain()
Return the data as a ByteBuffer after applying a
retain(). |
abstract ByteBufferReference |
getValueRetain(FetchRequest fetchRequest)
Get a compressed/decompressed/original version of the underlying value
after a
retain() |
abstract boolean |
needsRelease()
Returns true if explicit calls to
release() are required for this
object to be eagerly released else they can be skipped (e.g. |
abstract int |
referenceCount()
Get the current reference count for this object.
|
abstract void |
release()
An optional explicit release of the underlying data.
|
abstract boolean |
retain()
Explicitly mark the buffer to be retained so it is not released until
a corresponding
release() has been invoked. |
abstract int |
size()
Size of the underlying data.
|
public abstract int referenceCount()
public abstract boolean retain()
release() has been invoked.public abstract java.nio.ByteBuffer getBufferRetain()
public abstract java.nio.ByteBuffer getBuffer()
retain() or getValueRetain(com.gemstone.gemfire.internal.shared.FetchRequest) call.public abstract ByteBufferReference getValueRetain(FetchRequest fetchRequest)
retain()fetchRequest - one of the FetchRequest valuesFetchRequestpublic abstract void release()
NOTE: Implementations should never require this call to be invoked
(along with retain() and not lead to memory leaks if skipped.
Typically this means using NIO DirectByteBuffers for data which will
release automatically in the GC cycles when no references remain.
public abstract boolean needsRelease()
release() are required for this
object to be eagerly released else they can be skipped (e.g. heap buffers)public abstract int size()
Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.