Interface TaskOperations
- All Known Implementing Classes:
TaskTemplate
public interface TaskOperations
Interface defining operations available against tasks.
- Author:
- Glenn Renfro, Michael Minella, Gunnar Hillert, David Turanski, Corneil du Plessis
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup
(long id) Cleanup any resources associated with the execution for the id specified.void
cleanup
(long id, boolean removeData) Cleanup any resources associated with the execution for the id specified.void
cleanupAllTaskExecutions
(boolean completed, String taskName) Cleanup any resources associated with the matching task executions.Create a new task definitionReturn information including the count of currently executing tasks and task execution limits.void
Destroy an existing task.void
Destroy an existing task with the flag to cleanup task resources.void
Destroy all existing tasks.org.springframework.hateoas.PagedModel<TaskExecutionResource>
org.springframework.hateoas.PagedModel<TaskExecutionResource>
executionListByTaskName
(String taskName) List task executions known to the system filtered by task name.getAllTaskExecutionsCount
(boolean completed, String taskName) Get the task executions count with the option to filter only the completed task executions.Launch an already created task.org.springframework.hateoas.PagedModel<TaskDefinitionResource>
list()
org.springframework.hateoas.PagedModel<LauncherResource>
void
Request the stop of a groupTaskExecution
s.void
Request the stop of a groupTaskExecution
s.taskExecutionLog
(String externalExecutionId) Return the task execution log.taskExecutionLog
(String externalExecutionId, String platform) Return the task execution log.taskExecutionStatus
(long id) Return theTaskExecutionResource
for the id specified.org.springframework.hateoas.PagedModel<TaskExecutionThinResource>
org.springframework.hateoas.PagedModel<TaskExecutionThinResource>
thinExecutionListByTaskName
(String taskName) List task executions filtered by task name.validateTaskDefinition
(String taskDefinitionName) Return the validation status for the tasks in an definition.
-
Method Details
-
list
org.springframework.hateoas.PagedModel<TaskDefinitionResource> list()- Returns:
- the list tasks known to the system.
-
listPlatforms
org.springframework.hateoas.PagedModel<LauncherResource> listPlatforms()- Returns:
- the list of platform accounts for tasks.
-
create
Create a new task definition- Parameters:
name
- the name of the taskdefinition
- the task definition DSLdescription
- the description of the task definition- Returns:
- the task definition
-
launch
Launch an already created task.- Parameters:
name
- the name of the taskproperties
- the deployment propertiesarguments
- the command line arguments- Returns:
- long containing the TaskExecutionId
-
stop
Request the stop of a groupTaskExecution
s.- Parameters:
ids
- comma delimited set ofTaskExecution
ids to stop.
-
stop
Request the stop of a groupTaskExecution
s.- Parameters:
ids
- comma delimited set ofTaskExecution
ids to stop.platform
- the platform name where the task is executing.
-
destroy
Destroy an existing task.- Parameters:
name
- the name of the task
-
destroy
Destroy an existing task with the flag to cleanup task resources.- Parameters:
name
- the name of the taskcleanup
- flag indicates task execution cleanup
-
executionList
org.springframework.hateoas.PagedModel<TaskExecutionResource> executionList()- Returns:
- the list task executions known to the system.
-
thinExecutionList
org.springframework.hateoas.PagedModel<TaskExecutionThinResource> thinExecutionList()- Returns:
- the list of thin task executions known to the system.
-
thinExecutionListByTaskName
org.springframework.hateoas.PagedModel<TaskExecutionThinResource> thinExecutionListByTaskName(String taskName) List task executions filtered by task name.- Returns:
- the page of task executions for the given task name.
-
executionListByTaskName
org.springframework.hateoas.PagedModel<TaskExecutionResource> executionListByTaskName(String taskName) List task executions known to the system filtered by task name.- Parameters:
taskName
- of the executions.- Returns:
- the paged list of task executions for the given task name
-
taskExecutionStatus
Return theTaskExecutionResource
for the id specified.- Parameters:
id
- identifier of the task execution- Returns:
TaskExecutionResource
-
taskExecutionLog
Return the task execution log. The platform from which to retrieve the log will be set todefault
.- Parameters:
externalExecutionId
- the external execution identifier of the task execution.- Returns:
String
containing the log.
-
taskExecutionLog
Return the task execution log.- Parameters:
externalExecutionId
- the external execution identifier of the task execution.platform
- the platform from which to obtain the log.- Returns:
String
containing the log.
-
currentTaskExecutions
Collection<CurrentTaskExecutionsResource> currentTaskExecutions()Return information including the count of currently executing tasks and task execution limits.- Returns:
- Collection of
CurrentTaskExecutionsResource
-
cleanup
void cleanup(long id) Cleanup any resources associated with the execution for the id specified.- Parameters:
id
- identifier of the task execution
-
cleanup
void cleanup(long id, boolean removeData) Cleanup any resources associated with the execution for the id specified.- Parameters:
id
- identifier of the task executionremoveData
- delete the history of the execution
-
cleanupAllTaskExecutions
Cleanup any resources associated with the matching task executions.- Parameters:
completed
- cleanup only completed task executionstaskName
- the name of the task to cleanup, if null then all the tasks are considered.
-
getAllTaskExecutionsCount
Get the task executions count with the option to filter only the completed task executions.- Parameters:
completed
- cleanup only completed task executionstaskName
- the name of the task to cleanup, if null then all the tasks are considered.- Returns:
- the number of task executions.
-
validateTaskDefinition
TaskAppStatusResource validateTaskDefinition(String taskDefinitionName) throws OperationNotSupportedException Return the validation status for the tasks in an definition.- Parameters:
taskDefinitionName
- The name of the task definition to be validated.- Returns:
TaskAppStatusResource
containing the task app statuses.- Throws:
OperationNotSupportedException
- if the server does not support task validation
-
destroyAll
void destroyAll()Destroy all existing tasks.
-