public class TaskTemplate extends Object implements TaskOperations
TaskOperations
.Modifier and Type | Method and Description |
---|---|
void |
cleanup(long id,
String schemaTarget)
Cleanup any resources associated with the execution for the id specified.
|
void |
cleanup(long id,
String schemaTarget,
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.
|
LaunchResponseResource |
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,
String schemaTarget)
Request the stop of a group
TaskExecution s. |
void |
stop(String ids,
String schemaTarget,
String platform)
Request the stop of a group
TaskExecution s. |
String |
taskExecutionLog(String externalExecutionId)
Return the task execution log.
|
String |
taskExecutionLog(String externalExecutionId,
String platform)
Return the task execution log.
|
TaskExecutionResource |
taskExecutionStatus(long id,
String schemaTarget)
Return the
TaskExecutionResource for the id specified. |
TaskExecutionThinResource.Page |
thinExecutionList() |
TaskExecutionThinResource.Page |
thinExecutionListByTaskName(String taskName)
List task thin executions known to the system filtered by task name.
|
TaskAppStatusResource |
validateTaskDefinition(String taskDefinitionName)
Return the validation status for the tasks in an definition.
|
public TaskDefinitionResource.Page list()
list
in interface TaskOperations
public LauncherResource.Page listPlatforms()
listPlatforms
in interface TaskOperations
public TaskDefinitionResource create(String name, String definition, String description)
TaskOperations
create
in interface TaskOperations
name
- the name of the taskdefinition
- the task definition DSLdescription
- the description of the task definitionpublic LaunchResponseResource launch(String name, Map<String,String> properties, List<String> arguments)
TaskOperations
launch
in interface TaskOperations
name
- the name of the taskproperties
- the deployment propertiesarguments
- the command line argumentspublic void stop(String ids, String schemaTarget)
TaskOperations
TaskExecution
s.stop
in interface TaskOperations
ids
- comma delimited set of TaskExecution
ids to stop.schemaTarget
- the schema target of the task execution.public void stop(String ids, String schemaTarget, String platform)
TaskOperations
TaskExecution
s.stop
in interface TaskOperations
ids
- comma delimited set of TaskExecution
ids to stop.schemaTarget
- the schema target of the task execution.platform
- the platform name where the task is executing.public void destroy(String name)
TaskOperations
destroy
in interface TaskOperations
name
- the name of the taskpublic void destroy(String name, boolean cleanup)
TaskOperations
destroy
in interface TaskOperations
name
- the name of the taskcleanup
- flag indicates task execution cleanuppublic void destroyAll()
TaskOperations
destroyAll
in interface TaskOperations
public TaskExecutionResource.Page executionList()
executionList
in interface TaskOperations
public TaskExecutionThinResource.Page thinExecutionList()
thinExecutionList
in interface TaskOperations
public TaskExecutionThinResource.Page thinExecutionListByTaskName(String taskName)
TaskOperations
thinExecutionListByTaskName
in interface TaskOperations
taskName
- of the executions.public TaskExecutionResource.Page executionListByTaskName(String taskName)
TaskOperations
executionListByTaskName
in interface TaskOperations
taskName
- of the executions.public TaskExecutionResource taskExecutionStatus(long id, String schemaTarget)
TaskOperations
TaskExecutionResource
for the id specified.taskExecutionStatus
in interface TaskOperations
id
- identifier of the task executionschemaTarget
- the schema target of the task execution.TaskExecutionResource
public String taskExecutionLog(String externalExecutionId)
TaskOperations
default
.taskExecutionLog
in interface TaskOperations
externalExecutionId
- the external execution identifier of the task execution.String
containing the log.public String taskExecutionLog(String externalExecutionId, String platform)
TaskOperations
taskExecutionLog
in interface TaskOperations
externalExecutionId
- 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()
TaskOperations
currentTaskExecutions
in interface TaskOperations
CurrentTaskExecutionsResource
public void cleanup(long id, String schemaTarget)
TaskOperations
cleanup
in interface TaskOperations
id
- identifier of the task executionschemaTarget
- the schema target of the task execution.public void cleanup(long id, String schemaTarget, boolean removeData)
TaskOperations
cleanup
in interface TaskOperations
id
- identifier of the task executionschemaTarget
- the schema target of the task execution.removeData
- delete the history of the executionpublic void cleanupAllTaskExecutions(boolean completed, String taskName)
TaskOperations
cleanupAllTaskExecutions
in interface TaskOperations
completed
- 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)
TaskOperations
getAllTaskExecutionsCount
in interface TaskOperations
completed
- 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
TaskOperations
validateTaskDefinition
in interface TaskOperations
taskDefinitionName
- The name of the task definition to be validated.TaskAppStatusResource
containing the task app statuses.OperationNotSupportedException
- if the server does not support task validationCopyright © 2025 Pivotal Software, Inc.. All rights reserved.