Interface TaskExecutionService
- All Known Implementing Classes:
DefaultTaskExecutionService
public interface TaskExecutionService
Provides Task related services.
- Author:
- Michael Minella, Marius Bogoevici, Glenn Renfro, Mark Fisher, Janne Valkealahti, Gunnar Hillert, David Turanski, Daniel Serleg, Corneil du Plessis
-
Method Summary
Modifier and TypeMethodDescriptionexecuteTask
(String taskName, Map<String, String> taskDeploymentProperties, List<String> commandLineArgs) Execute a task with the provided task name and optional runtime properties.Retrieve the TaskManifest for the execution id providedfindTaskManifestByIds
(Set<Long> ids) getAllTaskExecutionIds
(boolean onlyCompleted, String taskName) Returns all the task execution IDs with the option to include only the completed task executions.getAllTaskExecutionsCount
(boolean onlyCompleted, String taskName) Returns the count of all the task execution IDs with the option to include only the completed task executions.getAllTaskExecutionsCount
(boolean onlyCompleted, String taskName, Integer includeTasksEndedMinDaysAgo) Returns the count of all the task execution IDs with the option to include only the completed task executions.Retrieve logs for the task application.void
stopTaskExecution
(Set<Long> ids) Request the platform to stop the task executions for the ids provided.void
stopTaskExecution
(Set<Long> ids, String platform) Request the platform to stop the task executions for the ids provided.
-
Method Details
-
executeTask
LaunchResponse executeTask(String taskName, Map<String, String> taskDeploymentProperties, List<String> commandLineArgs) Execute a task with the provided task name and optional runtime properties.- Parameters:
taskName
- Name of the task. Must not be null or empty.taskDeploymentProperties
- Optional deployment properties. Must not be null.commandLineArgs
- Optional runtime commandline argument- Returns:
- the taskExecutionId for the executed task.
-
getLog
Retrieve logs for the task application.- Parameters:
platformName
- the name of the platformtaskId
- the ID that uniquely identifies the task- Returns:
- the logs of the task application.
-
stopTaskExecution
Request the platform to stop the task executions for the ids provided.- Parameters:
ids
- a set of ids for the task executions to be stopped.
-
stopTaskExecution
Request the platform to stop the task executions for the ids provided.- Parameters:
ids
- a set of ids for the task executions to be stopped.platform
- The name of the platform where the tasks are executing.
-
findTaskManifestById
Retrieve the TaskManifest for the execution id provided- Parameters:
id
- task exectution id- Returns:
TaskManifest
or null if not found.
-
findTaskManifestByIds
- Parameters:
ids
- A set of task execution ids.- Returns:
- collection of manifests mapped by the relevant task execution id.
-
getAllTaskExecutionIds
Returns all the task execution IDs with the option to include only the completed task executions.- Parameters:
onlyCompleted
- filter by completed task executionstaskName
- the task name, if null then retrieve all the tasks- Returns:
- the set of execution ids.
- Since:
- 2.8
-
getAllTaskExecutionsCount
Returns the count of all the task execution IDs with the option to include only the completed task executions.- Parameters:
onlyCompleted
- whether to include only completed task executionstaskName
- the task name, if null then retrieve all the tasks- Returns:
- the number of executions
- Since:
- 2.8
-
getAllTaskExecutionsCount
Integer getAllTaskExecutionsCount(boolean onlyCompleted, String taskName, Integer includeTasksEndedMinDaysAgo) Returns the count of all the task execution IDs with the option to include only the completed task executions.- Parameters:
onlyCompleted
- whether to include only completed task executions (ignored whenincludeTasksEndedMinDaysAgo
is specified)taskName
- the task name, if null then retrieve all the tasksincludeTasksEndedMinDaysAgo
- only include tasks that have ended at least this many days ago- Returns:
- the number of executions, 0 if no data, never null
- Since:
- 2.11.0
-