RetryableTask

A retryable task defines its backoff period (the period between delays) and its timeout (the total period of the task)

public interface RetryableTask implements Task

Functions

aliases
Link copied to clipboard

A collection of known aliases.

Collection<Stringaliases()
execute
Link copied to clipboard

Execute the business logic of the task, using the provided stage execution state.

@Nonnull()
abstract TaskResult execute(StageExecution stage)
getBackoffPeriod
Link copied to clipboard

TODO(rz): Use Duration.

abstract long getBackoffPeriod()
getDynamicBackoffPeriod
Link copied to clipboard
long getDynamicBackoffPeriod(Duration taskDuration)
long getDynamicBackoffPeriod(StageExecution stage, Duration taskDuration)
getDynamicTimeout
Link copied to clipboard
long getDynamicTimeout(StageExecution stage)
getExtensionClass
Link copied to clipboard
Class<? extends SpinnakerExtensionPointgetExtensionClass()
getTimeout
Link copied to clipboard

TODO(rz): Use Duration.

abstract long getTimeout()
onCancel
Link copied to clipboard

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.

void onCancel(StageExecution stage)
onTimeout
Link copied to clipboard

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.

@Nullable()
TaskResult onTimeout(StageExecution stage)

Inheritors

OverridableTimeoutRetryableTask
Link copied to clipboard