Class AbstractScenarioThread

java.lang.Object
java.lang.Thread
org.palladiosimulator.protocom.framework.java.se.usage.AbstractScenarioThread
All Implemented Interfaces:
Runnable, IStopable
Direct Known Subclasses:
AbstractClosedScenarioThread, AbstractOpenScenarioThread

public abstract class AbstractScenarioThread extends Thread implements IStopable
Abstract class for running both closed and open workload users. For closed workloads, this class represents a single user. For open workloads, only one instance of this class represents the usage scenario and spawns a new thread each time the interarrival time has passed.
  • Field Details

    • LOGGER

      protected static final org.apache.log4j.Logger LOGGER
    • maxMeasurementCount

      protected long maxMeasurementCount
    • shouldContinue

      protected boolean shouldContinue
    • scenarioName

      protected String scenarioName
  • Constructor Details

    • AbstractScenarioThread

      public AbstractScenarioThread(de.uka.ipd.sdq.sensorframework.entities.Experiment exp, de.uka.ipd.sdq.sensorframework.entities.ExperimentRun expRun, String scenarioName, RunProperties runProps)
      Initialise thread and perform warmup runs. Number of warmup runs can be configured with -u option, or is 1000 as the default.
      Parameters:
      expRun -
      timeSpanSensor -
      runProps -
  • Method Details

    • run

      public void run()
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread
    • runAndMeasureUsageScenarioIteration

      protected abstract void runAndMeasureUsageScenarioIteration()
    • takeScenarioMeasurement

      protected void takeScenarioMeasurement(long start)
      FIXME: duplicate, see ExperimentManager!
      Parameters:
      start -
    • requestStop

      public void requestStop()
      Specified by:
      requestStop in interface IStopable
    • getScenarioRunner

      protected abstract Runnable getScenarioRunner(RunProperties runProps)
      Return a new instance of the usage scenario to be executed.
      Parameters:
      runProps -
      Returns: