Class InputOutputExperiment<T extends InputFromManager,S>
- Type Parameters:
T
- input-object typeS
- 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 Name | Default? | Description |
---|---|---|
"logExperiment" | yes | A textual log file for non-job-specific messages, one for the entire experiment. |
"logJob" | yes | A textual log file for job-specific messages, one for each job. |
- Author:
- Owen Feehan
-
Field Summary
Fields inherited from class org.anchoranalysis.experiment.bean.io.OutputExperiment
OUTPUT_EXECUTION_TIME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MultiLevelOutputEnabled
If specified, default rules for determine which outputs are enabled or not.protected Optional
<TaskStatistics> executeExperimentWithParameters
(ParametersExperiment parameters) Executes the experiment for parameters.getInput()
The input-manager to specify where/which/how necessary inputs for the experiment occur.Where log messages that do pertain to a specific job (input) appear.A message written to the logger if no inputs exist for the experiment, and it thus ends early.What task is associated with the experiment, and how it is processed.void
replaceInputManager
(InputManager<T> inputManager) Replace the existing @{link InputManager} associated with this class.void
replaceOutputManager
(OutputManager output) Replace the currently-assignedOutputManager
with another.void
replaceTask
(Task<T, S> taskToReplace) Replace the currently-assignedTask
with another.void
setInput
(InputManager<T> input) The input-manager to specify where/which/how necessary inputs for the experiment occur.void
setLogTask
(LoggingDestination logTask) Where log messages that do pertain to a specific job (input) appear.void
setMessageNoInputs
(String messageNoInputs) A message written to the logger if no inputs exist for the experiment, and it thus ends early.void
setTaskProcessor
(JobProcessor<T, S> taskProcessor) What task is associated with the experiment, and how it is processed.boolean
Whether to log in more or less detail.Methods inherited from class org.anchoranalysis.experiment.bean.io.OutputExperiment
executeExperiment, getExperimentIdentifier, getLogExperiment, getOutput, isForceDetailedLogging, setExperimentIdentifier, setForceDetailedLogging, setLogExperiment, setOutput
Methods inherited from class org.anchoranalysis.experiment.bean.Experiment
associateXML, getXMLConfiguration
Methods inherited from class org.anchoranalysis.bean.AnchorBean
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
-
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 classOutputExperiment
- Returns:
- true iff detailed logging should be employed.
-
replaceInputManager
Description copied from interface:ReplaceInputManager
Replace the existing @{link InputManager} associated with this class.- Specified by:
replaceInputManager
in interfaceReplaceInputManager<T extends InputFromManager>
- Parameters:
inputManager
- the new input-manager that is assigned.- Throws:
OperationFailedException
- if the assignment cannot complete successfully.
-
replaceOutputManager
Description copied from interface:ReplaceOutputManager
Replace the currently-assignedOutputManager
with another.- Specified by:
replaceOutputManager
in interfaceReplaceOutputManager
- Parameters:
output
- the task to replace.- Throws:
OperationFailedException
- if the task cannot be successfully replaced.
-
replaceTask
Description copied from interface:ReplaceTask
Replace the currently-assignedTask
with another.- Specified by:
replaceTask
in interfaceReplaceTask<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 classOutputExperiment
- 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
Description copied from class:OutputExperiment
If specified, default rules for determine which outputs are enabled or not.- Specified by:
defaultOutputs
in classOutputExperiment
- Returns:
- the default rules if they exist.
-
getInput
The input-manager to specify where/which/how necessary inputs for the experiment occur. -
setInput
The input-manager to specify where/which/how necessary inputs for the experiment occur. -
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
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
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
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
A message written to the logger if no inputs exist for the experiment, and it thus ends early. -
setMessageNoInputs
A message written to the logger if no inputs exist for the experiment, and it thus ends early.
-