@InterfaceAudience.Private public class BlockCacheKey extends java.lang.Object implements HeapSize, java.io.Serializable
BlockCache| Modifier and Type | Field and Description |
|---|---|
static long |
FIXED_OVERHEAD |
| Constructor and Description |
|---|
BlockCacheKey(java.lang.String hfileName,
long offset)
Construct a new BlockCacheKey
|
BlockCacheKey(java.lang.String hfileName,
long offset,
boolean isPrimaryReplica,
BlockType blockType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
BlockType |
getBlockType() |
java.lang.String |
getHfileName() |
long |
getOffset() |
int |
hashCode() |
long |
heapSize()
Strings have two bytes per character due to default Java Unicode encoding
(hence length times 2).
|
boolean |
isPrimary() |
java.lang.String |
toString() |
public BlockCacheKey(java.lang.String hfileName,
long offset)
hfileName - The name of the HFile this block belongs to.offset - Offset of the block into the filepublic BlockCacheKey(java.lang.String hfileName,
long offset,
boolean isPrimaryReplica,
BlockType blockType)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic long heapSize()
public java.lang.String getHfileName()
public boolean isPrimary()
public long getOffset()
public BlockType getBlockType()