Package org.apache.curator
Class SessionFailedRetryPolicy
java.lang.Object
org.apache.curator.SessionFailedRetryPolicy
- All Implemented Interfaces:
RetryPolicy
RetryPolicy
implementation that failed on session expired.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
allowRetry
(int retryCount, long elapsedTimeMs, RetrySleeper sleeper) Called when an operation has failed for some reason.boolean
allowRetry
(Throwable exception) Called when an operation has failed with a specific exception.
-
Constructor Details
-
SessionFailedRetryPolicy
-
-
Method Details
-
allowRetry
Description copied from interface:RetryPolicy
Called when an operation has failed for some reason. This method should return true to make another attempt.- Specified by:
allowRetry
in 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
-
allowRetry
Description copied from interface:RetryPolicy
Called when an operation has failed with a specific exception. This method should return true to make another attempt.- Specified by:
allowRetry
in interfaceRetryPolicy
- Parameters:
exception
- the cause that this operation failed- Returns:
- true/false
-