edu.iu.iv.modeling.p2p.chord
Class ChordAlgorithm

java.lang.Object
  |
  +--edu.iu.iv.modeling.p2p.chord.ChordAlgorithm
All Implemented Interfaces:
Algorithm

public class ChordAlgorithm
extends java.lang.Object
implements Algorithm

Wrapper for Chord Network Modeling Algorithm

Author:
Hardik Sheth (hsheth@indiana.edu)

Constructor Summary
ChordAlgorithm(int networkSize, int fingerTableSize)
          Constructor for ChordAlgorithm class.
 
Method Summary
 boolean execute()
          Runs the algorithm.
 java.lang.String getFileName()
          This method gets the name of the file that stores the network graph
 int getFingerTableSize()
          This method gets the minimum number of nodes to which a node connects
 int getNetworkSize()
          This method gets the size of the network
 void setFileName(java.lang.String filename)
          This method sets the name of the file which'll store the network graph
 void setFingerTableSize(int fingerTableSize)
          This method sets the minimum degree of the node
 void setNetworkSize(int networkSize)
          This method sets the size of the network to be built
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChordAlgorithm

public ChordAlgorithm(int networkSize,
                      int fingerTableSize)
Constructor for ChordAlgorithm class. It sets the network size and the minimum degree of the node

Parameters:
networkSize - - size of the network
fingerTableSize - - minimum degree of the node
Method Detail

execute

public boolean execute()
Description copied from interface: Algorithm
Runs the algorithm.

Specified by:
execute in interface Algorithm
Returns:
true if the algorithm ran successfully, false otherwise.
See Also:
Algorithm.execute()

setNetworkSize

public void setNetworkSize(int networkSize)
This method sets the size of the network to be built

Parameters:
networkSize -

getNetworkSize

public int getNetworkSize()
This method gets the size of the network

Returns:
network size

setFingerTableSize

public void setFingerTableSize(int fingerTableSize)
This method sets the minimum degree of the node

Parameters:
fingerTableSize -

getFingerTableSize

public int getFingerTableSize()
This method gets the minimum number of nodes to which a node connects

Returns:
fingertable size

getFileName

public java.lang.String getFileName()
This method gets the name of the file that stores the network graph

Returns:
String

setFileName

public void setFileName(java.lang.String filename)
This method sets the name of the file which'll store the network graph

Parameters:
filename -