Package org.apache.curator.retry
Class RetryForever
- java.lang.Object
-
- org.apache.curator.retry.RetryForever
-
- All Implemented Interfaces:
RetryPolicy
public class RetryForever extends java.lang.Object implements RetryPolicy
RetryPolicyimplementation that always allowsRetry.
-
-
Constructor Summary
Constructors Constructor Description RetryForever(int retryIntervalMs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowRetry(int retryCount, long elapsedTimeMs, RetrySleeper sleeper)Called when an operation has failed for some reason.
-
-
-
Method Detail
-
allowRetry
public boolean allowRetry(int retryCount, long elapsedTimeMs, RetrySleeper sleeper)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
-
-