|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFairness.Trees.TreeManager
public abstract class TreeManager
The TreeManager manages the construction of the stripe trees, and is also responsible for assigning node IDs and stripe IDs.
Field Summary | |
---|---|
protected Simulation |
sim
|
Constructor Summary | |
---|---|
TreeManager()
|
Method Summary | |
---|---|
void |
addNode(Node node)
Adds a Node to this TreeManager for it to manage and build into trees. |
java.lang.String |
forestToString()
Return a String version of the whole forest. |
protected java.util.Collection<Node> |
getAllNodes()
Returns all nodes in the network. |
abstract int |
getNextNodeId()
Returns the next node ID using the node ID allocation algorithm from this TreeManager. |
abstract java.util.Collection<Node> |
getRootNodes()
After a tree reconstruction, returns the nodes that are the roots of their stripe trees. |
abstract void |
rebuildTree()
A method to completely rebuild the Node tree given all nodes in the system. |
protected void |
setUp()
Called when the public setup method is called. |
void |
setUp(Simulation sim)
Sets up the tree manager to run within the given simulation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Simulation sim
Constructor Detail |
---|
public TreeManager()
Method Detail |
---|
protected java.util.Collection<Node> getAllNodes()
public void setUp(Simulation sim)
sim
- non-null Simulationprotected void setUp()
public abstract java.util.Collection<Node> getRootNodes()
public abstract void rebuildTree()
public void addNode(Node node)
node
- non-null Node that has an ID that came from getNextNodeId.public abstract int getNextNodeId()
public java.lang.String forestToString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |