Package jetbrains.buildServer.util.retry
Class Retrier.DelayStrategy
- java.lang.Object
-
- jetbrains.buildServer.util.retry.Retrier.DelayStrategy
-
-
Field Summary
Fields Modifier and Type Field Description static jetbrains.buildServer.util.retry.DelayListenerNO_DELAYNo delay between retries.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static jetbrains.buildServer.util.retry.DelayListenerconstantBackOff(int delayStepMs)The delay is constant amonst all retries.static jetbrains.buildServer.util.retry.DelayListenerexponentialBackoff(int delayStepMs)The delay increases exponentially with the number of retries, with a function of 2^retry.static jetbrains.buildServer.util.retry.DelayListenerlinearBackOff(int delayStepMs)The delay increases linearly with the number of retries.
-
-
-
Method Detail
-
linearBackOff
public static jetbrains.buildServer.util.retry.DelayListener linearBackOff(int delayStepMs)
The delay increases linearly with the number of retries.
Example: if the delay is configured to be 5ms, the first retry will wait 5ms, the second 10ms, the third 15ms, (...)- Parameters:
delayStepMs- the delay in milliseconds in between retries
-
constantBackOff
public static jetbrains.buildServer.util.retry.DelayListener constantBackOff(int delayStepMs)
The delay is constant amonst all retries.
Example: if the delay is configured to be 5ms, the first retry will wait 5ms, the second as well, and all the other retries.- Parameters:
delayStepMs- the delay in milliseconds in between retries
-
exponentialBackoff
public static jetbrains.buildServer.util.retry.DelayListener exponentialBackoff(int delayStepMs)
The delay increases exponentially with the number of retries, with a function of 2^retry.
Example: if the delay is configured to be 5ms, the first retry will wait 5ms, the second 10ms, the third 20ms, the fourth 40ms, (...)- Parameters:
delayStepMs- the delay in milliseconds in between retries
-
-