onCancelWithResult

Behavior to be called on Task cancellation.

This method should be used if you need to perform cleanup in response to the task being cancelled before it was able to complete.

When returning a TaskResult , the ExecutionStatus will be ignored, as the resulting status will always be CANCELED .

Parameters

stage

The running state execution state

@Nullable()
TaskResult onCancelWithResult(StageExecution stage)