Package ch.tatool.data

Examples of ch.tatool.data.Module


      }
    }

  /** Initializes this aspect. */
  private void initialize(ExecutionContext event) {
    Module module = event.getExecutionData().getModule();
    // read the last timeout data from the module aspect properties, use
    // default value if not provided
    long timeoutDuration = getDefaultTimerDuration();
    timeoutDuration = durationProperty.getValue(module, this, timeoutDuration);
    setDefaultTimerDuration(timeoutDuration);
View Full Code Here


  /**
   * Reduces the timer by the factor f with a minimum of minDuration
   */
  public void decreaseTimeoutDuration(ExecutionContext event) {
    Module module = event.getExecutionData().getModule();
    long newDuration = 0;
    newDuration = (long) (((float) getDefaultTimerDuration()) * factor);
    if (newDuration < minTimerDuration) {
      // set the minimal duration
      durationProperty.setValue(module, this, minTimerDuration);
View Full Code Here

  /**
   * Increases the timer by the factor f with a maximum of maxDuration
   */
  public void increaseTimeoutDuration(ExecutionContext event) {
    Module module = event.getExecutionData().getModule();
    long newDuration = 0;
    newDuration = (long) (((float) getDefaultTimerDuration()) / factor);
    if (newDuration > maxTimerDuration) {
      // set the maximal duration
      durationProperty.setValue(module, this, maxTimerDuration);
View Full Code Here

  /**
   * Initializes the algorithm with the values of the DB at session start
   */
  protected void initializeHandler(ExecutionContext context) {
    Module module = context.getExecutionData().getModule();
    benchmarkTotalPoints = benchmarkTotalPointsProperty.getValue(module, this, 0.0);
    benchmarkMaxPoints = benchmarkMaxPointsProperty.getValue(module, this, 0.0);
   
    totalScore = benchmarkTotalPoints;
    maxScore = benchmarkMaxPoints;
View Full Code Here

 
  /**
   * Initializes the algorithm with the values of the DB.
   */
  public void initializeAlgorithm(ExecutionContext event) {
    Module module = event.getExecutionData().getModule();
    counter = counterProperty.getValue(module, this, 0);
    benchmark = benchmarkProperty.getValue(module, this, 0.0);

    if (benchmark > 0) {
      doBenchmark = false; // we already have a benchmark
View Full Code Here

  /**
   * Initializes the algorithm with the values of the DB.
   */
  public void initializeAlgorithm(ExecutionContext event) {
    Module module = event.getExecutionData().getModule();

    // get the counters from the module
    trialCounter = trialCounterProperty.getValue(module, this, 0);
  }
View Full Code Here

        System.out.println("Initializing application...");
        startApplication();
       
        // create the account and the module
        UserAccount account = createAccount();
        Module module = createModule(account);
       
        // execute the module
        System.out.println("START: Executing module...");
        Executor executor = getExecutionService().createExecutor(module);
        getExecutionService().startExecution(executor, true);
View Full Code Here

    /**
     * Creates an empty persisted module instance.
     */
    protected Module createModule(UserAccount account) {
        // create the module using that configuration
        Module module = getModuleService().createModule(account, createModuleProperties(), createBinaryModuleProperties(), createModuleExporters());
        return module;
    }
View Full Code Here

    }

  private void sessionStart(ExecutionContext context) {
     
    // init handler values before first session
      Module module = context.getExecutionData().getModule();

      // read the last level state from the module
      Integer level = Level.getLevelProperty().ensureValue(module, this);
      Level.getLevelProperty().setValue(this, level);
     
View Full Code Here

      // Set the current level onto the session
      ModuleSession session = context.getExecutionData().getModuleSession();
      Level.getLevelProperty().setValue(session, this);
     
      // roll up the  the total points to zero
      Module module = context.getExecutionData().getModule();
     
      // load current module totals
      int minModule = totalMinPointsProperty.getValue(module, this, ZERO_POINTS);
    int currModule = totalPointsProperty.getValue(module, this, ZERO_POINTS);
    int maxModule = totalMaxPointsProperty.getValue(module, this, ZERO_POINTS);
View Full Code Here

TOP

Related Classes of ch.tatool.data.Module

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.