@InterfaceAudience.Private public interface Cacheable extends HeapSize
Modifier and Type | Interface and Description |
---|---|
static class |
Cacheable.MemoryType
SHARED means when this Cacheable is read back from cache it refers to the same memory area as
used by the cache for caching it.
|
Modifier and Type | Method and Description |
---|---|
BlockType |
getBlockType() |
CacheableDeserializer<Cacheable> |
getDeserializer()
Returns CacheableDeserializer instance which reconstructs original object from ByteBuffer.
|
Cacheable.MemoryType |
getMemoryType() |
int |
getSerializedLength()
Returns the length of the ByteBuffer required to serialized the object.
|
void |
serialize(ByteBuffer destination,
boolean includeNextBlockMetadata)
Serializes its data into destination.
|
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()
Cacheable.MemoryType getMemoryType()
MemoryType
of this CacheableCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.