com.sun.faban.driver.engine
Class Uniform

java.lang.Object
  extended by com.sun.faban.driver.engine.Cycle
      extended by com.sun.faban.driver.engine.Uniform
All Implemented Interfaces:
Serializable, Cloneable

public class Uniform
extends Cycle

Implements the uniform distribution/selection.

Author:
Akara Sucharitakul
See Also:
Serialized Form

Constructor Summary
Uniform()
           
 
Method Summary
 long getDelay(Random random)
          Randoms/calculates the delay time for a thread based on its supplied random number generator and the actual conditions in the distribution.
 double getHistogramMax()
          Provides the maximum value to be represented inside a histogram.
 void init(Annotation a)
          Initializes this cycle according to the annotation.
 
Methods inherited from class com.sun.faban.driver.engine.Cycle
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Uniform

public Uniform()
Method Detail

init

public void init(Annotation a)
          throws DefinitionException
Initializes this cycle according to the annotation.

Specified by:
init in class Cycle
Parameters:
a - The annotation
Throws:
DefinitionException - If there is an error in the annotation

getDelay

public long getDelay(Random random)
Randoms/calculates the delay time for a thread based on its supplied random number generator and the actual conditions in the distribution.

Specified by:
getDelay in class Cycle
Parameters:
random - The random number generator used
Returns:
The delay time

getHistogramMax

public double getHistogramMax()
Provides the maximum value to be represented inside a histogram.

Specified by:
getHistogramMax in class Cycle
Returns:
The max reasonable delay to be presented in the output histogram.