public class TaskTemplate extends Object implements TaskOperations
TaskOperations.| Modifier and Type | Method and Description |
|---|---|
void |
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.
|
TaskDefinitionResource |
create(String name,
String definition,
String description)
Create a new task definition
|
Collection<CurrentTaskExecutionsResource> |
currentTaskExecutions()
Return information including the count of currently executing tasks and task execution
limits.
|
void |
destroy(String name)
Destroy an existing task.
|
void |
destroy(String name,
boolean cleanup)
Destroy an existing task with the flag to cleanup task resources.
|
void |
destroyAll()
Destroy all existing tasks.
|
TaskExecutionResource.Page |
executionList() |
TaskExecutionResource.Page |
executionListByTaskName(String taskName)
List task executions known to the system filtered by task name.
|
Integer |
getAllTaskExecutionsCount(boolean completed,
String taskName)
Get the task executions count with the option to filter only the completed task executions.
|
long |
launch(String name,
Map<String,String> properties,
List<String> arguments)
Launch an already created task.
|
TaskDefinitionResource.Page |
list() |
LauncherResource.Page |
listPlatforms() |
void |
stop(String ids)
Request the stop of a group
TaskExecutions. |
void |
stop(String ids,
String platform)
Request the stop of a group
TaskExecutions. |
String |
taskExecutionLog(String externalExecutionId)
Return the task execution log.
|
String |
taskExecutionLog(String externalExecutionId,
String platform)
Return the task execution log.
|
TaskExecutionResource |
taskExecutionStatus(long id)
Return the
TaskExecutionResource for the id specified. |
TaskAppStatusResource |
validateTaskDefinition(String taskDefinitionName)
Return the validation status for the tasks in an definition.
|
public TaskDefinitionResource.Page list()
list in interface TaskOperationspublic LauncherResource.Page listPlatforms()
listPlatforms in interface TaskOperationspublic TaskDefinitionResource create(String name, String definition, String description)
TaskOperationscreate in interface TaskOperationsname - the name of the taskdefinition - the task definition DSLdescription - the description of the task definitionpublic long launch(String name, Map<String,String> properties, List<String> arguments)
TaskOperationslaunch in interface TaskOperationsname - the name of the taskproperties - the deployment propertiesarguments - the command line argumentspublic void stop(String ids)
TaskOperationsTaskExecutions.stop in interface TaskOperationsids - comma delimited set of TaskExecution ids to stop.public void stop(String ids, String platform)
TaskOperationsTaskExecutions.stop in interface TaskOperationsids - comma delimited set of TaskExecution ids to stop.platform - the platform name where the task is executing.public void destroy(String name)
TaskOperationsdestroy in interface TaskOperationsname - the name of the taskpublic void destroy(String name, boolean cleanup)
TaskOperationsdestroy in interface TaskOperationsname - the name of the taskcleanup - flag indicates task execution cleanuppublic void destroyAll()
TaskOperationsdestroyAll in interface TaskOperationspublic TaskExecutionResource.Page executionList()
executionList in interface TaskOperationspublic TaskExecutionResource.Page executionListByTaskName(String taskName)
TaskOperationsexecutionListByTaskName in interface TaskOperationstaskName - of the executions.public TaskExecutionResource taskExecutionStatus(long id)
TaskOperationsTaskExecutionResource for the id specified.taskExecutionStatus in interface TaskOperationsid - identifier of the task executionTaskExecutionResourcepublic String taskExecutionLog(String externalExecutionId)
TaskOperationsdefault.taskExecutionLog in interface TaskOperationsexternalExecutionId - the external execution identifier of the task execution.String containing the log.public String taskExecutionLog(String externalExecutionId, String platform)
TaskOperationstaskExecutionLog in interface TaskOperationsexternalExecutionId - the external execution identifier of the task execution.platform - the platform from which to obtain the log.String containing the log.public Collection<CurrentTaskExecutionsResource> currentTaskExecutions()
TaskOperationscurrentTaskExecutions in interface TaskOperationsCurrentTaskExecutionsResourcepublic void cleanup(long id)
TaskOperationscleanup in interface TaskOperationsid - identifier of the task executionpublic void cleanup(long id,
boolean removeData)
TaskOperationscleanup in interface TaskOperationsid - identifier of the task executionremoveData - delete the history of the executionpublic void cleanupAllTaskExecutions(boolean completed,
String taskName)
TaskOperationscleanupAllTaskExecutions in interface TaskOperationscompleted - cleanup only completed task executionstaskName - the name of the task to cleanup, if null then all the tasks are considered.public Integer getAllTaskExecutionsCount(boolean completed, String taskName)
TaskOperationsgetAllTaskExecutionsCount in interface TaskOperationscompleted - cleanup only completed task executionstaskName - the name of the task to cleanup, if null then all the tasks are considered.public TaskAppStatusResource validateTaskDefinition(String taskDefinitionName) throws OperationNotSupportedException
TaskOperationsvalidateTaskDefinition in interface TaskOperationstaskDefinitionName - The name of the task definition to be validated.TaskAppStatusResource containing the task app statuses.OperationNotSupportedException - if the server does not support task validationCopyright © 2022 Pivotal Software, Inc.. All rights reserved.