Fairness.Nodes.TreeBehaviors
Class AbstractTreeBehavior

java.lang.Object
  extended by Fairness.Nodes.TreeBehaviors.AbstractTreeBehavior
All Implemented Interfaces:
TreeBehavior
Direct Known Subclasses:
NormalTreeBehavior

public class AbstractTreeBehavior
extends java.lang.Object
implements TreeBehavior

AbstractTreeBehavior is a part of the Taxation scheme currently not implemented in our project.


Constructor Summary
AbstractTreeBehavior()
           
 
Method Summary
 void joinNextStripe(Node myNode)
          Tells the node to join another stripe.
 void partStripe(Node myNode)
          Tells this behavior to remove the Node from a stripe, to reduce its subscription level by one.
 boolean wantJoinMore(Node myNode)
          Returns true if the Node wants to join more stripes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractTreeBehavior

public AbstractTreeBehavior()
Method Detail

wantJoinMore

public boolean wantJoinMore(Node myNode)
Returns true if the Node wants to join more stripes.

Specified by:
wantJoinMore in interface TreeBehavior
Parameters:
myNode - non-null Node to which this behavior belongs.
Returns:
true if the Node wants to join more stripes.

joinNextStripe

public void joinNextStripe(Node myNode)
Tells the node to join another stripe.

Specified by:
joinNextStripe in interface TreeBehavior
Parameters:
myNode - non-null Node to which this behavior belongs.
Throws:
java.lang.IllegalStateException - if wantJoinMore(Fairness.Nodes.Node) returns false.

partStripe

public void partStripe(Node myNode)
Tells this behavior to remove the Node from a stripe, to reduce its subscription level by one.

Specified by:
partStripe in interface TreeBehavior
Parameters:
myNode - non-null Node to which this behavior belongs.