Package org.apache.curator.retry
Class RetryForever
java.lang.Object
org.apache.curator.retry.RetryForever
- All Implemented Interfaces:
RetryPolicy
RetryPolicy implementation that always allowsRetry.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowRetry(int retryCount, long elapsedTimeMs, RetrySleeper sleeper) Called when an operation has failed for some reason.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.curator.RetryPolicy
allowRetry
-
Constructor Details
-
RetryForever
public RetryForever(int retryIntervalMs)
-
-
Method Details
-
allowRetry
Description copied from interface:RetryPolicyCalled when an operation has failed for some reason. This method should return true to make another attempt.- Specified by:
allowRetryin interfaceRetryPolicy- 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
-