Class RetryWithTimeOutStrategy
java.lang.Object
fr.enedis.chutney.engine.domain.execution.strategies.RetryWithTimeOutStrategy
- All Implemented Interfaces:
StepExecutionStrategy
Retry every retryDelay execution of a Step until success or until timeOut
Expects following strategy properties:
- timeOut: duration before giving up on the execution of a failed step
- retryDelay: waiting duration before retrying execution of a failed step
Expected duration format: "floating_positive_number [duration_unit]" where floating_positive_number : the duration value (ex.: 10) time_unit : the duration unit. Valid values are: - "min" or "m" for minutes - "sec" or "s" for seconds - "ms" for milliseconds empty values are interpreted as seconds Example: timeOut: "5 min", or "300 sec", ...
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute(ScenarioExecution scenarioExecution, Step step, ScenarioContext scenarioContext, Map<String, Object> localContext, StepExecutionStrategies strategies) getType()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface fr.enedis.chutney.engine.domain.execution.strategies.StepExecutionStrategy
execute
-
Constructor Details
-
RetryWithTimeOutStrategy
public RetryWithTimeOutStrategy()
-
-
Method Details
-
getType
- Specified by:
getTypein interfaceStepExecutionStrategy
-
execute
public Status execute(ScenarioExecution scenarioExecution, Step step, ScenarioContext scenarioContext, Map<String, Object> localContext, StepExecutionStrategies strategies) throws IllegalStateException- Specified by:
executein interfaceStepExecutionStrategy- Throws:
IllegalStateException- when sleep is interrupted
-