|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--ostore.dataobj.Btree.InteriorNode
The InteriorNode object is the interior node of the Btree. It holds a few fields of overhead and arrays of (2*degree - 1) keys and (2*degree) pointers to other nodes (interior nodes or data nodes).
| Constructor Summary | |
|---|---|
Btree.InteriorNode(Btree.InteriorNode n)
|
|
Btree.InteriorNode(InputBuffer buffer)
|
|
Btree.InteriorNode(int btree_type,
int degree)
|
|
| Method Summary | |
|---|---|
boolean |
childIsTemp(int index,
HandleStore handle_store)
|
SecureHash |
computeGuid()
Compute and return the guid of the object. |
SecureHash |
computeVhash()
Compute and return the verification hash of the object. |
void |
copyChild(int from,
int to)
|
void |
copyKey(int from,
int to)
|
static Btree.InteriorNode |
fromGuidBytes(byte[] data,
int[] offset)
|
static Btree.InteriorNode |
fromGuidBytes(InputBuffer buffer)
|
CacheablePinned |
getChild(int index,
HandleStore handle_store,
DataCache cache)
|
SecureHash |
getChildGuid(int index)
|
SecureHash |
getChildVhash(int index)
|
SecureHash |
getFhash()
Return the secure hash at the root of the verification tree constructed from the erasure-encoded fragments of a block. |
BtreeKey |
getKey(int index)
|
static int |
getSerializedKeySize(int btree_type)
|
static int |
getSerializedOverhead(int btree_type)
|
static int |
getSerializedPointerSize(int btree_type)
|
static int |
getSizeInBytes(int btree_type,
int degree)
|
int |
getUsed()
|
int |
incrementUsed()
|
boolean |
isDataNode()
|
boolean |
isFull()
|
boolean |
isLeaf()
|
void |
serialize(OutputBuffer buffer)
Add the object to the buffer. |
void |
setChildGuid(int index,
SecureHash guid)
|
void |
setChildVhash(int index,
SecureHash hash)
|
void |
setFhash(SecureHash fhash)
Record the secure hash at the root of the verification tree constructed from the erasure-encoded fragments of a block. |
void |
setKey(int index,
BtreeKey key)
|
void |
setLeaf(boolean leaf)
|
void |
setUsed(int u)
|
void |
toGuidBytes(byte[] data,
int[] offset)
Serialize the object in a form suitable for computing the block guid of the object. |
String |
toString()
|
void |
toVhashBytes(byte[] data,
int[] offset)
Serialize the object in a form suitable for computing the verification hash of the object. |
boolean |
verifyGuid(SecureHash guid)
Verify the contents of the object against its given guid. |
boolean |
verifyVhash(SecureHash vhash)
Verify the contents of the object against its given verification hash. |
void |
voidChild(int i)
|
void |
voidKey(int i)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Btree.InteriorNode(int btree_type,
int degree)
public Btree.InteriorNode(Btree.InteriorNode n)
public Btree.InteriorNode(InputBuffer buffer)
throws QSException
| Method Detail |
public static Btree.InteriorNode fromGuidBytes(byte[] data,
int[] offset)
throws QSException
QSException
public static Btree.InteriorNode fromGuidBytes(InputBuffer buffer)
throws QSException
QSException
public static int getSizeInBytes(int btree_type,
int degree)
public static int getSerializedOverhead(int btree_type)
public static int getSerializedKeySize(int btree_type)
public static int getSerializedPointerSize(int btree_type)
public void voidKey(int i)
public void voidChild(int i)
public String toString()
toString in class Objectpublic boolean isFull()
public boolean isLeaf()
isLeaf in interface BtreeNodepublic void setLeaf(boolean leaf)
public int getUsed()
public void setUsed(int u)
public int incrementUsed()
public void setKey(int index,
BtreeKey key)
public void copyKey(int from,
int to)
public BtreeKey getKey(int index)
public boolean childIsTemp(int index,
HandleStore handle_store)
public CacheablePinned getChild(int index,
HandleStore handle_store,
DataCache cache)
throws CacheMissException
CacheMissException
public void setChildGuid(int index,
SecureHash guid)
public void setChildVhash(int index,
SecureHash hash)
public SecureHash getChildVhash(int index)
public SecureHash getChildGuid(int index)
public void copyChild(int from,
int to)
public SecureHash getFhash()
VerifiableBlock
getFhash in interface VerifiableBlockpublic void setFhash(SecureHash fhash)
VerifiableBlock
setFhash in interface VerifiableBlockfhash - the secure hash at the root of the verification treepublic boolean isDataNode()
isDataNode in interface BtreeNodepublic SecureHash computeVhash()
VerifiableBlock
computeVhash in interface VerifiableBlockpublic boolean verifyVhash(SecureHash vhash)
VerifiableBlock
verifyVhash in interface VerifiableBlockvhash - the vhash against which to verify the object
true iff the hash of the object matches
vhash; false otherwise
public void toVhashBytes(byte[] data,
int[] offset)
VerifiableBlock
toVhashBytes in interface VerifiableBlockdata - See ostore.util.QuickSerializable.to_bytesoffset - See ostore.util.QuickSerializable.to_bytes
public SecureHash computeGuid()
throws BlockNotGuidVerifiableException
VerifiableBlock
computeGuid in interface VerifiableBlockBlockNotGuidVerifiableExceptionVerifiableBlock.setFhash(ostore.util.SecureHash)
public void toGuidBytes(byte[] data,
int[] offset)
throws BlockNotGuidVerifiableException
VerifiableBlock
toGuidBytes in interface VerifiableBlockdata - See ostore.util.QuickSerializable.to_bytesoffset - See ostore.util.QuickSerializable.to_bytes
BlockNotGuidVerifiableException
public boolean verifyGuid(SecureHash guid)
throws BlockNotGuidVerifiableException
VerifiableBlock
verifyGuid in interface VerifiableBlockguid - the block guid against which to verify the object
true iff the guid of the object matches
bguid; false otherwise
BlockNotGuidVerifiableExceptionpublic void serialize(OutputBuffer buffer)
QuickSerializablebuffer.
serialize in interface QuickSerializablebuffer - the output buffer to add the object to
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||