infoservice.dynamic
Class DynamicCascadeConfigurator

java.lang.Object
  extended by infoservice.dynamic.DynamicCascadeConfigurator

public class DynamicCascadeConfigurator
extends java.lang.Object

This class is used to build new dynamic cascades. The selection which mix will be in which cascade is done via the selected IDynamicCascadeBuildingStrategy. Existing cascades for the mixes which were assigned new cascades will be removed from the database

Author:
LERNGRUPPE

Constructor Summary
DynamicCascadeConfigurator()
           
 
Method Summary
 void buildCascades(long a_seed)
          This method gets called to build new cascades.
private  MixCascade getCurrentCascade(java.lang.String a_mixId)
          Returns the current cascade for the mix with the given ID.
private  boolean isUsable(MixInfo a_mixInfo)
          Checks to see if the given MixInfo may be used in a dynamic cascade A MixInfo is "usable" if a) it is a dynamic mix b) it is not assigned to a semi-dynamic cascade
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicCascadeConfigurator

public DynamicCascadeConfigurator()
Method Detail

buildCascades

public void buildCascades(long a_seed)
This method gets called to build new cascades. The given seed is used as the seed for the Pseudorandomnumbergenerator such that all InfoServices can get the same resulting cascades (given they have the same seed which is ensured at another place)

Parameters:
a_seed - The seed for the PRNG

getCurrentCascade

private MixCascade getCurrentCascade(java.lang.String a_mixId)
Returns the current cascade for the mix with the given ID.

Parameters:
a_mixId - The ID of the mix in question
Returns:
The current MixCascade for the mix or null

isUsable

private boolean isUsable(MixInfo a_mixInfo)
Checks to see if the given MixInfo may be used in a dynamic cascade A MixInfo is "usable" if a) it is a dynamic mix b) it is not assigned to a semi-dynamic cascade

Parameters:
a_mixInfo - The MixInfo to be tested
Returns:
true if the mix may be used, false otherwise