com.sun.faban.driver.engine
Class Cycle

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

public abstract class Cycle
extends Object
implements Serializable, Cloneable

Super class of all distributions.

See Also:
Serialized Form

Constructor Summary
Cycle()
           
 
Method Summary
 Object clone()
          Makes a deep copy of this cycle object.
abstract  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.
abstract  double getHistogramMax()
          Provides the maximum value to be represented inside a histogram.
abstract  void init(Annotation a)
          Initializes this cycle according to the annotation.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cycle

public Cycle()
Method Detail

clone

public Object clone()
Makes a deep copy of this cycle object.

Overrides:
clone in class Object
Returns:
A deep copy of this cycle object.
See Also:
Object.clone()

init

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

Parameters:
a - The annotation
Throws:
DefinitionException - If there is an error in the annotation

getDelay

public abstract 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.

Parameters:
random - The random number generator used
Returns:
The delay time

getHistogramMax

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

Returns:
The max reasonable delay to be presented in the output histogram.