org.apache.curator
Interface RetryPolicy
- All Known Implementing Classes:
- BoundedExponentialBackoffRetry, ExponentialBackoffRetry, RetryNTimes, RetryOneTime, RetryUntilElapsed
public interface RetryPolicy
Abstracts the policy to use when retrying connections
|
Method Summary |
boolean |
allowRetry(int retryCount,
long elapsedTimeMs,
RetrySleeper sleeper)
Called when an operation has failed for some reason. |
allowRetry
boolean allowRetry(int retryCount,
long elapsedTimeMs,
RetrySleeper sleeper)
- Called when an operation has failed for some reason. This method should return
true to make another attempt.
- Parameters:
retryCount - the number of times retried so far (0 the first time)elapsedTimeMs - the elapsed time in ms since the operation was attemptedsleeper - use this to sleep - DO NOT call Thread.sleep
- Returns:
- true/false
Copyright © 2011–2014 The Apache Software Foundation. All rights reserved.