sg.edu.nus.peer.info
Class NodeInfo

java.lang.Object
  extended by sg.edu.nus.peer.info.NodeInfo
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AdjacentNodeInfo, ChildNodeInfo, ParentNodeInfo

public abstract class NodeInfo
extends java.lang.Object
implements java.io.Serializable

An abstract class used for define the data structure of each node in the BATON tree.

Version:
1.0 2006-2-6
Author:
Xu Linhao
See Also:
Serialized Form

Constructor Summary
NodeInfo(PhysicalInfo physicalInfo, LogicalInfo logicalInfo)
          Construct the node.
NodeInfo(java.lang.String serializeData)
          Construct the node with a serialized string value.
 
Method Summary
 LogicalInfo getLogicalInfo()
          Get the logical information of the node.
 PhysicalInfo getPhysicalInfo()
          Get the physical information of the node.
 java.lang.String serialize()
          Get the serialized string representation of the NodeInfo.
 void setLogicalInfo(LogicalInfo logicalInfo)
          Set the logical information of the node.
 void setPhysicalInfo(PhysicalInfo physicalInfo)
          Set the physical information of the node.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NodeInfo

public NodeInfo(PhysicalInfo physicalInfo,
                LogicalInfo logicalInfo)
Construct the node.

Parameters:
physicalInfo - the physical information of the node
logicalInfo - the logical information of the node

NodeInfo

public NodeInfo(java.lang.String serializeData)
Construct the node 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

setLogicalInfo

public void setLogicalInfo(LogicalInfo logicalInfo)
Set the logical information of the node.

Parameters:
logicalInfo - the logical information of the node

getLogicalInfo

public LogicalInfo getLogicalInfo()
Get the logical information of the node.

Returns:
the logical information of the node

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 NodeInfo.

Returns:
the serialized string representation of the NodeInfo