Fairness
Class TreeReconstructionEvent
java.lang.Object
Fairness.TreeReconstructionEvent
- All Implemented Interfaces:
- SimulationEvent
public class TreeReconstructionEvent
- extends java.lang.Object
- implements SimulationEvent
TreeReconstructionEvent invokes the TreeManager.rebuildTree()
method at a given rate.
This event is "perpetual" in that it will always reschedule itself when it fires. When the tree
is rebuilt, all NodeTransferEvent events are cancelled to drop all packets in the network.
Also, a collection of NodeMonitor objects are held in this event, and when the event fires, all
of the monitors get marked.
Constructor Summary |
TreeReconstructionEvent(TreeManager manager,
java.util.Collection<NodeMonitor> monitors,
double rebuildRate)
Constructs a new TreeReconstructionEvent to call rebuildTree on the given manager every
'rebuildRate' seconds. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TreeReconstructionEvent
public TreeReconstructionEvent(TreeManager manager,
java.util.Collection<NodeMonitor> monitors,
double rebuildRate)
- Constructs a new TreeReconstructionEvent to call rebuildTree on the given manager every
'rebuildRate' seconds.
perform
public void perform(Simulation sim,
double time)
- Performs the event that is occuring within a
Simulation
. If an event wishes
to re-execute later, it may schedule itself again using the provided Simulation reference.
- Specified by:
perform
in interface SimulationEvent
- Parameters:
sim
- non-null Simulationtime
- simulation time, exactly equal to the result of Simulation.getTime()