sg.edu.nus.protocol.body
Class SPLBFindLightlyNodeBody

java.lang.Object
  extended by sg.edu.nus.protocol.body.Body
      extended by sg.edu.nus.protocol.body.SPLBFindLightlyNodeBody
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class SPLBFindLightlyNodeBody
extends Body
implements java.io.Serializable

Implement the message body used for finding a lightly loaded node for a heavily loaded node

Version:
1.0 2006-2-22
Author:
Vu Quang Hieu
See Also:
Serialized Form

Constructor Summary
SPLBFindLightlyNodeBody(PhysicalInfo physicalSender, LogicalInfo logicalSender, PhysicalInfo physicalOverloaded, LogicalInfo logicalOverloaded, int order, int nextIndex, boolean direction, int queryLoad, LogicalInfo logicalDestination)
          Construct the message body with speicified parameters.
SPLBFindLightlyNodeBody(java.lang.String serializeData)
          Construct the message body with a string value.
 
Method Summary
 boolean getDirection()
          Get direction of searching
 LogicalInfo getLogicalDestination()
          Get logical address of the receiver
 LogicalInfo getLogicalOverloaded()
          Get logical address of the overloaded node
 LogicalInfo getLogicalSender()
          Get logical address of the sender
 int getNextIndex()
          Get the next interval jumping
 int getOrder()
          Get order of the overloaded node
 PhysicalInfo getPhysicalOverloaded()
          Get physical address of the overloaded node
 PhysicalInfo getPhysicalSender()
          Get physical address of the sender
 int getQueryLoad()
          Get query load of the overloaded node
 java.lang.String getString()
          Return a readable string for testing or writing in the log file
 void setLogicalDestination(LogicalInfo logicalDestination)
          Update logical address of the receiver
 void setLogicalSender(LogicalInfo logicalSender)
          Update logical address of the sender
 void setNextIndex(int nextIndex)
          Set the next interval jumping
 void setPhysicalSender(PhysicalInfo physicalSender)
          Update physical address of the sender
 java.lang.String toString()
           
 
Methods inherited from class sg.edu.nus.protocol.body.Body
clone
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SPLBFindLightlyNodeBody

public SPLBFindLightlyNodeBody(PhysicalInfo physicalSender,
                               LogicalInfo logicalSender,
                               PhysicalInfo physicalOverloaded,
                               LogicalInfo logicalOverloaded,
                               int order,
                               int nextIndex,
                               boolean direction,
                               int queryLoad,
                               LogicalInfo logicalDestination)
Construct the message body with speicified parameters.

Parameters:
physicalSender - physical address of the sender
logicalSender - logical address of the sender
physicalOverloaded - physical address of the overloaded node
logicalOverloaded - logical address of the overloaded node
order - order of the overloaded node
nextIndex - the interval of searching, index of the next jump
direction - false search towards the left true search towards the right
queryLoad - load of query messages at the overloaded node
logicalDestination - logical address of the receiver

SPLBFindLightlyNodeBody

public SPLBFindLightlyNodeBody(java.lang.String serializeData)
Construct the message body with a string value.

Parameters:
serializeData - the string value that contains the serialized message body
Method Detail

setPhysicalSender

public void setPhysicalSender(PhysicalInfo physicalSender)
Update physical address of the sender

Parameters:
physicalSender - physical address of the sender

getPhysicalSender

public PhysicalInfo getPhysicalSender()
Get physical address of the sender

Returns:
physical address of the sender

setLogicalSender

public void setLogicalSender(LogicalInfo logicalSender)
Update logical address of the sender

Parameters:
logicalSender - logical address of the sender

getLogicalSender

public LogicalInfo getLogicalSender()
Get logical address of the sender

Returns:
logical address of the sender

getPhysicalOverloaded

public PhysicalInfo getPhysicalOverloaded()
Get physical address of the overloaded node

Returns:
physical address of the overloaded node

getLogicalOverloaded

public LogicalInfo getLogicalOverloaded()
Get logical address of the overloaded node

Returns:
logical address of the overloaded node

getOrder

public int getOrder()
Get order of the overloaded node

Returns:
order of the overloaded node

setNextIndex

public void setNextIndex(int nextIndex)
Set the next interval jumping

Parameters:
nextIndex - tnext interval jumping

getNextIndex

public int getNextIndex()
Get the next interval jumping

Returns:
next interval jumping

getDirection

public boolean getDirection()
Get direction of searching

Returns:
direction of searching

getQueryLoad

public int getQueryLoad()
Get query load of the overloaded node

Returns:
query load of the overloaded node

setLogicalDestination

public void setLogicalDestination(LogicalInfo logicalDestination)
Update logical address of the receiver

Parameters:
logicalDestination - logical address of the receiver

getLogicalDestination

public LogicalInfo getLogicalDestination()
Get logical address of the receiver

Returns:
logical address of the receiver

getString

public java.lang.String getString()
Return a readable string for testing or writing in the log file

Returns:
a readable string

toString

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