iitb.con.indexing.isam
Class NonLeafNode

java.lang.Object
  extended by iitb.con.indexing.isam.NonLeafNode
All Implemented Interfaces:
ItemSerializer<NonLeafNode>

public class NonLeafNode
extends java.lang.Object
implements ItemSerializer<NonLeafNode>

Non-Leaf Node of the index tree. A non-leaf node consists of the key with respective pointers (block id) of leaf nodes.


Field Summary
 short BlockId
          Block id of leaf node
 java.lang.Object value
          Key for the non-leaf node
 
Constructor Summary
NonLeafNode()
           
NonLeafNode(java.lang.Object value)
           
NonLeafNode(java.lang.Object value, short BlockId)
           
 
Method Summary
 java.lang.Object attributeDeSerialize(java.nio.ByteBuffer buf, java.lang.Object name)
          Deserializes the specified attribute to object value
 NonLeafNode deSerialize(java.nio.ByteBuffer buf)
          Deserializes the given bytes into non-leaf node.
 java.nio.ByteBuffer serialize(NonLeafNode node)
          Serializes into bytes of the given non-leaf node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BlockId

public short BlockId
Block id of leaf node


value

public java.lang.Object value
Key for the non-leaf node

Constructor Detail

NonLeafNode

public NonLeafNode()

NonLeafNode

public NonLeafNode(java.lang.Object value)

NonLeafNode

public NonLeafNode(java.lang.Object value,
                   short BlockId)
Method Detail

attributeDeSerialize

public java.lang.Object attributeDeSerialize(java.nio.ByteBuffer buf,
                                             java.lang.Object name)
Deserializes the specified attribute to object value

Specified by:
attributeDeSerialize in interface ItemSerializer<NonLeafNode>
Parameters:
buf - bytes as ByteBuffer
name - attribute name
Returns:
deserialized attribute value as Object

deSerialize

public NonLeafNode deSerialize(java.nio.ByteBuffer buf)
Deserializes the given bytes into non-leaf node. Format {[Key] : [Block Id]}

Specified by:
deSerialize in interface ItemSerializer<NonLeafNode>
Parameters:
buf - bytes as ByteBuffer
Returns:
non-leaf node - NonLeafNode

serialize

public java.nio.ByteBuffer serialize(NonLeafNode node)
Serializes into bytes of the given non-leaf node.

Format {[Key] : [Block Id]}

Specified by:
serialize in interface ItemSerializer<NonLeafNode>
Parameters:
node - non-leaf node - NonLeafNode
Returns:
serialized node as ByteBuffer