Fairness.Publishers
Class Publisher

java.lang.Object
  extended by Fairness.Publishers.Publisher
Direct Known Subclasses:
BitForBitPublisher, LinearTaxationPublisher

public abstract class Publisher
extends java.lang.Object

Publisher represents the source of taxation in the system.

This class is not used in the current implementation as taxation was not implemented.


Constructor Summary
protected Publisher(int availableStripes)
          Constructs a new Publisher that splits its content into the given number of stripes.
 
Method Summary
 int getAvailableStripes()
          Returns the number of stripes available from this Publisher.
 int getTax(int r)
          Returns the number of children that a node must accept for fowarding a single stream to receive the given number of stripes.
protected abstract  int getTaxImpl(int r)
          Implements precisely the getTax method, except that the child class can assume the preconditions on r have been checked.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Publisher

protected Publisher(int availableStripes)
Constructs a new Publisher that splits its content into the given number of stripes.

Method Detail

getAvailableStripes

public int getAvailableStripes()
Returns the number of stripes available from this Publisher.


getTax

public int getTax(int r)
Returns the number of children that a node must accept for fowarding a single stream to receive the given number of stripes.

Parameters:
r - Number of stripes to receive, must be greater than 0 and less than or equal the number of total available stripes.
Returns:
The number of children that a node must accept to receive the benefit.

getTaxImpl

protected abstract int getTaxImpl(int r)
Implements precisely the getTax method, except that the child class can assume the preconditions on r have been checked.

See Also:
getTax(int)