com.sun.faban.driver.engine
Class FixedSequence

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

public class FixedSequence
extends Mix

The implementation of the fixed sequence annotation.

Author:
Akara Sucharitakul
See Also:
Serialized Form

Nested Class Summary
static class FixedSequence.Selector
          The selector implementation for the fixed sequence.
 
Field Summary
 
Fields inherited from class com.sun.faban.driver.engine.Mix
className
 
Constructor Summary
FixedSequence()
           
 
Method Summary
 void configure(Element driverConfigNode)
          Configures/overrides the mix from the driverConfig DOM node read from the configuration file.
 FlatMix flatMix()
          Returns the flat mix representation of this mix.
 void init(Class<?> driverClass, Annotation a)
          Initializes this mix according to the annotation.
 void normalize()
          Normalizes the mix so it is ready for use in selections.
 FixedSequence.Selector selector(Random random)
          Obtains the per-thread and per-driver instance selector.
 
Methods inherited from class com.sun.faban.driver.engine.Mix
clone, getLogger, getMix
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FixedSequence

public FixedSequence()
Method Detail

init

public void init(Class<?> driverClass,
                 Annotation a)
          throws DefinitionException
Initializes this mix according to the annotation.

Specified by:
init in class Mix
Parameters:
driverClass - The driver class annotating this mix
a - The annotation
Throws:
DefinitionException - If there is an error in the annotation

configure

public void configure(Element driverConfigNode)
               throws ConfigurationException
Configures/overrides the mix from the driverConfig DOM node read from the configuration file. The FixedSequence does not allow mix configurations so any operationMix element will cause this method to throw a ConfigurationException

Specified by:
configure in class Mix
Parameters:
driverConfigNode - The driverConfig DOM node
Throws:
ConfigurationException - If operationMix element exists

normalize

public void normalize()
Normalizes the mix so it is ready for use in selections. The fixed sequence has no selection and does not need normalization so this method is a noop.

Specified by:
normalize in class Mix

flatMix

public FlatMix flatMix()
Returns the flat mix representation of this mix. This is used for consistent reporting.

Specified by:
flatMix in class Mix
Returns:
The flat mix representation.

selector

public FixedSequence.Selector selector(Random random)
Obtains the per-thread and per-driver instance selector.

Specified by:
selector in class Mix
Parameters:
random - The per-thread random value generator
Returns:
The selector to be used by the driver