public class StormBoundedExponentialBackoffRetry
extends org.apache.storm.shade.org.apache.curator.retry.BoundedExponentialBackoffRetry
Constructor and Description |
---|
StormBoundedExponentialBackoffRetry(int baseSleepTimeMs,
int maxSleepTimeMs,
int maxRetries)
The class provides generic exponential-linear backoff retry strategy for storm.
|
Modifier and Type | Method and Description |
---|---|
long |
getSleepTimeMs(int retryCount,
long elapsedTimeMs) |
getMaxSleepTimeMs
public StormBoundedExponentialBackoffRetry(int baseSleepTimeMs, int maxSleepTimeMs, int maxRetries)
The class provides generic exponential-linear backoff retry strategy for storm. It calculates threshold for exponentially increasing sleeptime for retries. Beyond this threshold, the sleeptime increase is linear.
Also adds jitter for exponential/linear retry. It guarantees currSleepTimeMs >= prevSleepTimeMs
and baseSleepTimeMs <=
currSleepTimeMs <= maxSleepTimeMs
Copyright © 2022 The Apache Software Foundation. All rights reserved.