@InterfaceAudience.Private public interface Cacheable extends HeapSize, HBaseReferenceCounted
Modifier and Type | Method and Description |
---|---|
BlockType |
getBlockType()
Returns the block type of this cached HFile block
|
CacheableDeserializer<Cacheable> |
getDeserializer()
Returns CacheableDeserializer instance which reconstructs original object from ByteBuffer.
|
int |
getSerializedLength()
Returns the length of the ByteBuffer required to serialized the object.
|
default int |
refCnt()
Reference count of this Cacheable.
|
default boolean |
release()
Decrease its reference count, and if no reference then free the memory of this object, its
backend is usually a
ByteBuff , and we will put its NIO
ByteBuffers back to ByteBuffAllocator |
default Cacheable |
retain()
Increase its reference count, and only when no reference we can free the object's memory.
|
void |
serialize(ByteBuffer destination,
boolean includeNextBlockMetadata)
Serializes its data into destination.
|
release, retain, touch, touch
int getSerializedLength()
void serialize(ByteBuffer destination, boolean includeNextBlockMetadata)
destination
- Where to serialize toincludeNextBlockMetadata
- Whether to include nextBlockMetadata in the Cache block.CacheableDeserializer<Cacheable> getDeserializer()
BlockType getBlockType()
default Cacheable retain()
retain
in interface org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted
default int refCnt()
refCnt
in interface org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted
default boolean release()
ByteBuff
, and we will put its NIO
ByteBuffers back to ByteBuffAllocator
release
in interface org.apache.hbase.thirdparty.io.netty.util.ReferenceCounted
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.