Interface JobProcess<P extends JobParameters>
- Type Parameters:
P
- The type of the parameters
- All Known Implementing Classes:
PyNNJobProcess
public interface JobProcess<P extends JobParameters>
An interface to an executable job process type.
-
Method Summary
Modifier and Type Method Description void
cleanup()
Cleans up the job, removing any associated files.void
execute(String machineUrl, SpinnakerMachine machine, P parameters, LogWriter logWriter)
Executes the job.Throwable
getError()
Gets any errors returned by the job.List<File>
getOutputs()
Gets any outputs from the job.List<ProvenanceItem>
getProvenance()
Gets any provenance data from the job.Status
getStatus()
Gets the status of the job.
-
Method Details
-
execute
Executes the job.- Parameters:
machineUrl
- The URL to request a machine using (ornull
if machine is given)machine
- The machine to execute the job on (ornull
if a URL is given)parameters
- The parameters of the joblogWriter
- Somewhere to write logs to
-
getStatus
Status getStatus()Gets the status of the job.- Returns:
- The status
-
getError
Throwable getError()Gets any errors returned by the job. If the status is not Error, this should returnnull
- Returns:
- An error, or
null
if no error
-
getOutputs
Gets any outputs from the job. Should always return a list, but this list can be empty if there are no outputs.- Returns:
- A list of output files.
-
getProvenance
List<ProvenanceItem> getProvenance()Gets any provenance data from the job. Should always return a list, but this map can be empty if there is no provenance.- Returns:
- A list of provenance items to add
-
cleanup
void cleanup()Cleans up the job, removing any associated files.
-