Fairness.Nodes
Class TreeInfo

java.lang.Object
  extended by Fairness.Nodes.TreeInfo

public class TreeInfo
extends java.lang.Object

TreeInfo contains information on a Node's participation in a single stripe tree.


Constructor Summary
TreeInfo(int stripeId)
          Constructs a new TreeInfo
 
Method Summary
 void addChild(Node child)
          Adds the given child to this node for this TreeInfo's stripe.
 java.util.Set<Node> getChildren()
          Return a set of all current children of the node for this stripe.
 Node getParent()
          Returns the parent of the node in this stripe.
 int getStripeId()
           
 void removeChild(Node child)
          Removes the given child from this node for this TreeInfo's stripe, if the given node is actually a child.
 void setParent(Node parent)
          Sets the Node's parent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeInfo

public TreeInfo(int stripeId)
Constructs a new TreeInfo

Parameters:
stripeId - stripe ID this information is for
Method Detail

getStripeId

public int getStripeId()

getParent

public Node getParent()
Returns the parent of the node in this stripe. Null means that a parent has not been assigned yet (if during tree rebuild), or that the publisher is the parent (after tree rebuild).

Returns:
nullable parent

addChild

public void addChild(Node child)
Adds the given child to this node for this TreeInfo's stripe.

Parameters:
child - non-null Node

removeChild

public void removeChild(Node child)
Removes the given child from this node for this TreeInfo's stripe, if the given node is actually a child.

Parameters:
child - non-null Node

setParent

public void setParent(Node parent)
Sets the Node's parent.


getChildren

public java.util.Set<Node> getChildren()
Return a set of all current children of the node for this stripe.