RetryPolicy Class
- java.
lang. Object - com.
microsoft. azure. eventhubs. RetryPolicy
- com.
public abstract class RetryPolicy
Constructor Summary
Modifier | Constructor | Description | |
---|---|---|---|
protected | RetryPolicy(String name) |
Method Summary
Modifier and Type | Method and Description |
---|---|
static
Retry |
getDefault() |
Duration |
getNextRetryInterval(String clientId, Exception lastException, Duration remainingTime)
Gets the Interval after which next |
static
Retry |
getNoRetry() |
protected int | getRetryCount(String clientId) |
void | incrementRetryCount(String clientId) |
static boolean | isRetryableException(Exception exception) |
protected abstract Duration | onGetNextRetryInterval(String clientId, Exception lastException, Duration remainingTime, int baseWaitTime) |
void | resetRetryCount(String clientId) |
String | toString() |
Methods inherited from java.lang.Object
Constructor Details
RetryPolicy
protected RetryPolicy(String name)
Parameters:
Method Details
getDefault
public static RetryPolicy getDefault()
getNextRetryInterval
public Duration getNextRetryInterval(String clientId, Exception lastException, Duration remainingTime)
Gets the Interval after which nextRetry should be done.
Parameters:
Returns:
getNoRetry
public static RetryPolicy getNoRetry()
getRetryCount
protected int getRetryCount(String clientId)
Parameters:
incrementRetryCount
public void incrementRetryCount(String clientId)
Parameters:
isRetryableException
public static boolean isRetryableException(Exception exception)
Parameters:
onGetNextRetryInterval
protected abstract Duration onGetNextRetryInterval(String clientId, Exception lastException, Duration remainingTime, int baseWaitTime)
Parameters:
resetRetryCount
public void resetRetryCount(String clientId)
Parameters:
toString
public String toString()
Overrides:
RetryPolicy.toString()Applies to
Azure SDK for Java