-
- All Implemented Interfaces:
-
com.netflix.spinnaker.kork.plugins.api.internal.SpinnakerExtensionPoint,org.pf4j.ExtensionPoint
@Beta() public interface Task implements SpinnakerExtensionPointA discrete unit of work in a pipeline execution that does one thing and one thing only.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description @interfaceTask.AliasesAllows backwards compatibility of a task's "type", even through class renames / refactors.
-
Method Summary
Modifier and Type Method Description abstract TaskResultexecute(StageExecution stage)Execute the business logic of the task, using the provided stage execution state. TaskResultonTimeout(StageExecution stage)Behavior to be called on Task timeout. voidonCancel(StageExecution stage)Behavior to be called on Task cancellation. TaskResultonCancelWithResult(StageExecution stage)Behavior to be called on Task cancellation. Collection<String>aliases()A collection of known aliases. -
-
Method Detail
-
execute
@Nonnull() abstract TaskResult execute(StageExecution stage)
Execute the business logic of the task, using the provided stage execution state.
- Parameters:
stage- The running stage execution stage
-
onTimeout
@Nullable() TaskResult onTimeout(StageExecution stage)
Behavior to be called on Task timeout.
This method should be used if you need to perform any cleanup operations in response to the task being aborted after taking too long to complete.
- Parameters:
stage- The running state execution state
-
onCancel
@Deprecated() void onCancel(StageExecution stage)
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.
- Parameters:
stage- The running state execution state
-
onCancelWithResult
@Nullable() TaskResult onCancelWithResult(StageExecution stage)
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
-
aliases
Collection<String> aliases()
A collection of known aliases.
-
-
-
-