|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFairness.Trees.TreeManager
Fairness.Trees.PastryTreeManager
public class PastryTreeManager
PastryTreeManager implements the Pastry-style tree routing algorithm from the SplitStream paper. The algorithm is covered in detail in the paper analysis in the final report for the SplitStream.
Field Summary |
---|
Fields inherited from class Fairness.Trees.TreeManager |
---|
sim |
Constructor Summary | |
---|---|
PastryTreeManager()
|
Method Summary | |
---|---|
void |
addNode(Node node)
Adds a Node to this TreeManager for it to manage and build into trees. |
void |
findParent(int stripeId,
Node n)
Finds the parent for the given node for a particular stripe identified by the stripeId. |
int |
getNextNodeId()
Returns the next node ID using the node ID allocation algorithm from this TreeManager. |
java.util.Collection<Node> |
getRootNodes()
After a tree reconstruction, returns the nodes that are the roots of their stripe trees. |
void |
orphanChild(Node n,
Node justAdded,
int stripeOrphanWants)
Determines the orphan that will be rejected by n (could be justAdded) and then finds a new parent for this orphan for the stripe identified by the stripeOrphanWants id. |
void |
rebuildTree()
A method to completely rebuild the Node tree given all nodes in the system. |
void |
searchSCG(Node orphan,
int stripeId)
This method finds a parent for orphan for the specified stripe by searching randomly in the "Spare Capacity Group" (this terminology is borrowed from the SplitStream implementation, but in this implementation, the Spare Capacity Group is nothing more than a Set of nodes having spare outbound bandwidth enough to handle one more child. |
protected void |
setUp()
Called when the public setup method is called. |
Methods inherited from class Fairness.Trees.TreeManager |
---|
forestToString, getAllNodes, setUp |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PastryTreeManager()
Method Detail |
---|
protected void setUp()
TreeManager
setUp
in class TreeManager
public java.util.Collection<Node> getRootNodes()
getRootNodes
in class TreeManager
public void addNode(Node node)
addNode
in class TreeManager
node
- non-null Node that has an ID that came from getNextNodeId.public int getNextNodeId()
getNextNodeId
in class TreeManager
public void rebuildTree()
rebuildTree
in class TreeManager
public void findParent(int stripeId, Node n)
n
- non-null Node that has an ID that came from getNextNodeId.stripeId
- - the int id identifying the stripe the node is attempting to receivepublic void orphanChild(Node n, Node justAdded, int stripeOrphanWants)
n
- non-null Node that has an ID that came from getNextNodeId.justAdded
- the Node that was just added as the child of nstripeOrphanWants
- the id of the stripe that the orphan needspublic void searchSCG(Node orphan, int stripeId)
orphan
- the orphan who needs to receive the stripe identified by stripeIdstripeId
- the integer id for the stripe that orphan needs
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |