Tasks.terminateAsync 方法

定义

重载

terminateAsync(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.

terminateAsync(String jobId, String taskId, final ServiceCallback<Void> serviceCallback)

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.

terminateAsync(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.

terminateAsync(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions, final ServiceCallback<Void> serviceCallback)

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.

terminateAsync(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 Observable<Void> terminateAsync(String jobId, String taskId)

参数

jobId
String

The ID of the job containing the task.

taskId
String

The ID of the task to terminate.

返回

Observable<Void>

the ServiceResponseWithHeaders object if successful.

例外

IllegalArgumentException

thrown if parameters fail the validation

terminateAsync(String jobId, String taskId, final ServiceCallback<Void> serviceCallback)

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 ServiceFuture<Void> terminateAsync(String jobId, String taskId, final ServiceCallback<Void> serviceCallback)

参数

jobId
String

The ID of the job containing the task.

taskId
String

The ID of the task to terminate.

serviceCallback
final ServiceCallback<Void>

the async ServiceCallback to handle successful and failed responses.

返回

ServiceFuture<Void>

the ServiceFuture object

例外

IllegalArgumentException

thrown if parameters fail the validation

terminateAsync(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 Observable<Void> terminateAsync(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

返回

Observable<Void>

the ServiceResponseWithHeaders object if successful.

例外

IllegalArgumentException

thrown if parameters fail the validation

terminateAsync(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions, final ServiceCallback<Void> serviceCallback)

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 ServiceFuture<Void> terminateAsync(String jobId, String taskId, TaskTerminateOptions taskTerminateOptions, final ServiceCallback<Void> serviceCallback)

参数

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

serviceCallback
final ServiceCallback<Void>

the async ServiceCallback to handle successful and failed responses.

返回

ServiceFuture<Void>

the ServiceFuture object

例外

IllegalArgumentException

thrown if parameters fail the validation

适用于