Class InputOutputExperiment<T extends InputFromManager,S>

Type Parameters:
T - input-object type
S - shared-state for job
All Implemented Interfaces:
AssociateXMLUponLoad, ReplaceInputManager<T>, ReplaceOutputManager, ReplaceTask<T,S>

public class InputOutputExperiment<T extends InputFromManager,S> extends OutputExperiment implements ReplaceInputManager<T>, ReplaceOutputManager, ReplaceTask<T,S>
An experiment that uses both an InputManager to specify inputs and a OutputManager to specify outputting.

The following outputs are produced:

Output NameDefault?Description
"logExperiment"yesA textual log file for non-job-specific messages, one for the entire experiment.
"logJob"yesA textual log file for job-specific messages, one for each job.
Author:
Owen Feehan
  • Constructor Details

    • InputOutputExperiment

      public InputOutputExperiment()
  • Method Details

    • useDetailedLogging

      public boolean useDetailedLogging()
      Description copied from class: Experiment
      Whether to log in more or less detail.

      It's appropriate to perform more detailed logging for a lengthier experiment, but something quick and simple is preferable for a short job, which may only be outputted to the console.

      Overrides:
      useDetailedLogging in class OutputExperiment
      Returns:
      true iff detailed logging should be employed.
    • replaceInputManager

      public void replaceInputManager(InputManager<T> inputManager) throws OperationFailedException
      Description copied from interface: ReplaceInputManager
      Replace the existing @{link InputManager} associated with this class.
      Specified by:
      replaceInputManager in interface ReplaceInputManager<T extends InputFromManager>
      Parameters:
      inputManager - the new input-manager that is assigned.
      Throws:
      OperationFailedException - if the assignment cannot complete successfully.
    • replaceOutputManager

      public void replaceOutputManager(OutputManager output) throws OperationFailedException
      Description copied from interface: ReplaceOutputManager
      Replace the currently-assigned OutputManager with another.
      Specified by:
      replaceOutputManager in interface ReplaceOutputManager
      Parameters:
      output - the task to replace.
      Throws:
      OperationFailedException - if the task cannot be successfully replaced.
    • replaceTask

      public void replaceTask(Task<T,S> taskToReplace) throws OperationFailedException
      Description copied from interface: ReplaceTask
      Replace the currently-assigned Task with another.
      Specified by:
      replaceTask in interface ReplaceTask<T extends InputFromManager,S>
      Parameters:
      taskToReplace - the task to replace.
      Throws:
      OperationFailedException - if the task cannot be successfully replaced.
    • executeExperimentWithParameters

      protected Optional<TaskStatistics> executeExperimentWithParameters(ParametersExperiment parameters) throws ExperimentExecutionException
      Description copied from class: OutputExperiment
      Executes the experiment for parameters.
      Specified by:
      executeExperimentWithParameters in class OutputExperiment
      Parameters:
      parameters - a combination of run-time and bean-time specified elements used in the experiment.
      Returns:
      statistics of the tasks, if they exist.
      Throws:
      ExperimentExecutionException - if anything occurs stop the experiment finishing its execution
    • defaultOutputs

      protected MultiLevelOutputEnabled defaultOutputs()
      Description copied from class: OutputExperiment
      If specified, default rules for determine which outputs are enabled or not.
      Specified by:
      defaultOutputs in class OutputExperiment
      Returns:
      the default rules if they exist.
    • getInput

      public InputManager<T> getInput()
      The input-manager to specify where/which/how necessary inputs for the experiment occur.
    • setInput

      public void setInput(InputManager<T> input)
      The input-manager to specify where/which/how necessary inputs for the experiment occur.
    • getTaskProcessor

      public JobProcessor<T,S> getTaskProcessor()
      What task is associated with the experiment, and how it is processed.

      e.g. how the task processes the inputs in the form of jobs (sequentially, parallel, how many processors? etc.)

    • setTaskProcessor

      public void setTaskProcessor(JobProcessor<T,S> taskProcessor)
      What task is associated with the experiment, and how it is processed.

      e.g. how the task processes the inputs in the form of jobs (sequentially, parallel, how many processors? etc.)

    • getLogTask

      public LoggingDestination getLogTask()
      Where log messages that do pertain to a specific job (input) appear.

      This is in contrast to logExperiment where non-job specific log messages appear.

    • setLogTask

      public void setLogTask(LoggingDestination logTask)
      Where log messages that do pertain to a specific job (input) appear.

      This is in contrast to logExperiment where non-job specific log messages appear.

    • getMessageNoInputs

      public String getMessageNoInputs()
      A message written to the logger if no inputs exist for the experiment, and it thus ends early.
    • setMessageNoInputs

      public void setMessageNoInputs(String messageNoInputs)
      A message written to the logger if no inputs exist for the experiment, and it thus ends early.