Tasks.terminate 方法
定义
重载
terminate(String jobId, String taskId) |
Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.
|
terminate(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions) |
Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.
|
terminate(String jobId, String taskId)
Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.
public void terminate(String jobId, String taskId)
参数
- jobId
- String
The ID of the job containing the task.
- taskId
- String
The ID of the task to terminate.
例外
thrown if parameters fail the validation
thrown if the request is rejected by server
all other wrapped checked exceptions if the request fails to be sent
terminate(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions)
Terminates the specified task. When the task has been terminated, it moves to the completed state. For multi-instance tasks, the terminate task operation applies synchronously to the primary task; subtasks are then terminated asynchronously in the background.
public void terminate(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions)
参数
- jobId
- String
The ID of the job containing the task.
- taskId
- String
The ID of the task to terminate.
- taskTerminateOptions
- TaskTerminateOptions
Additional parameters for the operation
例外
thrown if parameters fail the validation
thrown if the request is rejected by server
all other wrapped checked exceptions if the request fails to be sent