sg.edu.nus.peer.info
Class RoutingItemInfo

java.lang.Object
  extended by sg.edu.nus.peer.info.RoutingItemInfo
All Implemented Interfaces:
java.io.Serializable

public class RoutingItemInfo
extends java.lang.Object
implements java.io.Serializable

Define the data structure of the routing item in the routing table.

Version:
1.0 2006-2-6
Author:
Vu Quang Hieu, (Modified by) Xu Linhao
See Also:
Serialized Form

Constructor Summary
RoutingItemInfo(PhysicalInfo physicalInfo, LogicalInfo logicalInfo, ChildNodeInfo leftChild, ChildNodeInfo rightChild, BoundaryValue minValue, BoundaryValue maxValue)
          Construct a routing item.
RoutingItemInfo(java.lang.String serializeData)
          Construct a routing item with a serialized string value.
 
Method Summary
 ChildNodeInfo getLeftChild()
          Get the left child of the current node.
 LogicalInfo getLogicalInfo()
          Set the right child of the current node.
 BoundaryValue getMaxValue()
          Get the maximum index key.
 BoundaryValue getMinValue()
          Get the minimum index key.
 PhysicalInfo getPhysicalInfo()
          Get the physical information of the node.
 ChildNodeInfo getRightChild()
          Get the right child of the current node.
 java.lang.String serialize()
          Get the serialized string representation of the RoutingItemInfo.
 void setLeftChild(ChildNodeInfo leftChild)
          Set the left child of the current node.
 void setPhysicalInfo(PhysicalInfo physicalInfo)
          Set the physical information of the node
 void setRightChild(ChildNodeInfo rightChild)
          Set the right child of the current node.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RoutingItemInfo

public RoutingItemInfo(PhysicalInfo physicalInfo,
                       LogicalInfo logicalInfo,
                       ChildNodeInfo leftChild,
                       ChildNodeInfo rightChild,
                       BoundaryValue minValue,
                       BoundaryValue maxValue)
Construct a routing item.

Parameters:
physicalInfo - the physical information of the node
logicalInfo - the logical information of the node
leftChild - the left child of the node
rightChild - the right child of the node
minValue - the minimum index key
maxValue - the maximum index key

RoutingItemInfo

public RoutingItemInfo(java.lang.String serializeData)
Construct a routing item with a serialized string value.

Parameters:
serializeData - the serialized string value
Method Detail

setPhysicalInfo

public void setPhysicalInfo(PhysicalInfo physicalInfo)
Set the physical information of the node

Parameters:
physicalInfo - the physical information of the node

getPhysicalInfo

public PhysicalInfo getPhysicalInfo()
Get the physical information of the node.

Returns:
the physical information of the node

getLogicalInfo

public LogicalInfo getLogicalInfo()
Set the right child of the current node.

Returns:
the right child of the current node

setLeftChild

public void setLeftChild(ChildNodeInfo leftChild)
Set the left child of the current node.

Parameters:
leftChild - the left child of the current node

getLeftChild

public ChildNodeInfo getLeftChild()
Get the left child of the current node.

Returns:
the left child of the current node

setRightChild

public void setRightChild(ChildNodeInfo rightChild)
Set the right child of the current node.

Parameters:
rightChild - the right child of the current node

getRightChild

public ChildNodeInfo getRightChild()
Get the right child of the current node.

Returns:
the right child of the current node

getMinValue

public BoundaryValue getMinValue()
Get the minimum index key.

Returns:
the minimum index key

getMaxValue

public BoundaryValue getMaxValue()
Get the maximum index key.

Returns:
the maximum index key

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

serialize

public java.lang.String serialize()
Get the serialized string representation of the RoutingItemInfo.

Returns:
the serialized string representation of the RoutingItemInfo