example.loadbalance
Class ResetQuota

java.lang.Object
  extended by example.loadbalance.ResetQuota
All Implemented Interfaces:
Control

public class ResetQuota
extends java.lang.Object
implements Control

This class restores the quota value at each node in the topology in order to be able to perform the next cycle. It is assumed that the network nodes are instancies of the BasicBalance class.

Note that this control can be replaced by the library class MethodInvoker by configuring method "resetQuota".


Parameter Summary
protocol
          The protocol to operate on.
 
Constructor Summary
ResetQuota(java.lang.String prefix)
          Standard constructor that reads the configuration parameters.
 
Method Summary
 boolean execute()
          Performs arbitrary modifications or reports arbitrary information over the components.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Parameter Detail

protocol

The protocol to operate on.

Constructor Detail

ResetQuota

public ResetQuota(java.lang.String prefix)
Standard constructor that reads the configuration parameters. Invoked by the simulation engine.

Parameters:
prefix - the configuration prefix for this class.
Method Detail

execute

public boolean execute()
Description copied from interface: Control
Performs arbitrary modifications or reports arbitrary information over the components.

Specified by:
execute in interface Control
Returns:
true if the simulation has to be stopped, false otherwise.