example.loadbalance
Class LinearDistributionInitializer

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

public class LinearDistributionInitializer
extends java.lang.Object
implements Control

This class provides a simple linear distribution in a bounded interval defined by PAR_MIN and PAR_MAX parameters. It is assumed that the network nodes comply to the SingleValue interface.


Parameter Summary
max
          The upper bound of the values.
min
          The lower bound of the values.
protocol
          The protocol to operate on.
 
Constructor Summary
LinearDistributionInitializer(java.lang.String prefix)
          Standard constructor that reads the configuration parameters.
 
Method Summary
 boolean execute()
          This class provides a simple linear distribution in a bounded interval defined by parameters PAR_MIN and PAR_MAX.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Parameter Detail

max

The upper bound of the values.


min

The lower bound of the values. Defaults to -max.


protocol

The protocol to operate on.

Constructor Detail

LinearDistributionInitializer

public LinearDistributionInitializer(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()
This class provides a simple linear distribution in a bounded interval defined by parameters PAR_MIN and PAR_MAX.

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