Package de.hybris.platform.util.backoff
Interface BackoffStrategy
-
- All Known Implementing Classes:
ExponentialBackoffStrategy
public interface BackoffStrategyback-off strategy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.time.DurationerrorOccurred()Informs back-off mechanism about failurevoidresetBackOffState()Reset back off state.booleanshouldRetry()
-
-
-
Method Detail
-
errorOccurred
java.time.Duration errorOccurred()
Informs back-off mechanism about failure- Returns:
- back-off time adjusted by fail
-
resetBackOffState
void resetBackOffState()
Reset back off state. Call this method after successful attempts if you want to reuse the class
-
shouldRetry
boolean shouldRetry()
- Returns:
- true if there are tries left
-
-