Class CopyFiles<T>

Object
AnchorBean<Task<FileWithDirectoryInput, RecordingCounter<T>>>
Task<FileWithDirectoryInput, RecordingCounter<T>>
CopyFiles<T>
Type Parameters:
T - shared-state of naming

public class CopyFiles<T> extends Task<FileWithDirectoryInput, RecordingCounter<T>>
Copy files to the output-directory, possibly changing the name or performing other operations like compression in the process.

Unusually this task does not use the InputOutputContext for each job, but rather for the experiment as a whole when determining the destination path for files. Similarly the message-log of the experiment is used for non-error messages.

The following outputs are produced:

Output NameDefault?Description
"copy"yesa copied file for each input file.
outputs from the RecordingCounter
outputs from Task
Author:
Owen Feehan
  • Constructor Details

    • CopyFiles

      public CopyFiles()
  • Method Details

    • hasVeryQuickPerInputExecution

      public boolean hasVeryQuickPerInputExecution()
      Specified by:
      hasVeryQuickPerInputExecution in class Task<FileWithDirectoryInput, RecordingCounter<T>>
    • inputTypesExpected

      public InputTypesExpected inputTypesExpected()
      Specified by:
      inputTypesExpected in class Task<FileWithDirectoryInput, RecordingCounter<T>>
    • beforeAnyJobIsExecuted

      public RecordingCounter<T> beforeAnyJobIsExecuted(Outputter outputter, ConcurrencyPlan concurrencyPlan, List<FileWithDirectoryInput> inputs, ParametersExperiment parameters) throws ExperimentExecutionException
      Specified by:
      beforeAnyJobIsExecuted in class Task<FileWithDirectoryInput, RecordingCounter<T>>
      Throws:
      ExperimentExecutionException
    • doJobOnInput

      public void doJobOnInput(InputBound<FileWithDirectoryInput, RecordingCounter<T>> input) throws JobExecutionException
      Specified by:
      doJobOnInput in class Task<FileWithDirectoryInput, RecordingCounter<T>>
      Throws:
      JobExecutionException
    • afterAllJobsAreExecuted

      public void afterAllJobsAreExecuted(RecordingCounter<T> sharedState, InputOutputContext context) throws ExperimentExecutionException
      Specified by:
      afterAllJobsAreExecuted in class Task<FileWithDirectoryInput, RecordingCounter<T>>
      Throws:
      ExperimentExecutionException
    • defaultOutputs

      public OutputEnabledMutable defaultOutputs()
      Overrides:
      defaultOutputs in class Task<FileWithDirectoryInput, RecordingCounter<T>>
    • getMethod

      public CopyFilesMethod getMethod()
      How the copying occurs from source to destination file.

      e.g. with or without compression.

    • setMethod

      public void setMethod(CopyFilesMethod method)
      How the copying occurs from source to destination file.

      e.g. with or without compression.

    • getNaming

      public CopyFilesNaming<T> getNaming()
      How an output name (and path) is selected for an input file.
    • setNaming

      public void setNaming(CopyFilesNaming<T> naming)
      How an output name (and path) is selected for an input file.