RetryPolicy Class

  • java.lang.Object
    • com.microsoft.azure.eventhubs.RetryPolicy

public abstract class RetryPolicy

Methods inherited from java.lang.Object

Constructor Details

RetryPolicy

protected RetryPolicy(String name)

Parameters:

name

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:

clientId - clientId
lastException - lastException
remainingTime - remainingTime to retry

Returns:

returns 'null' Duration when not Allowed

getNoRetry

public static RetryPolicy getNoRetry()

getRetryCount

protected int getRetryCount(String clientId)

Parameters:

clientId

incrementRetryCount

public void incrementRetryCount(String clientId)

Parameters:

clientId

isRetryableException

public static boolean isRetryableException(Exception exception)

Parameters:

exception

onGetNextRetryInterval

protected abstract Duration onGetNextRetryInterval(String clientId, Exception lastException, Duration remainingTime, int baseWaitTime)

Parameters:

clientId
lastException
remainingTime
baseWaitTime

resetRetryCount

public void resetRetryCount(String clientId)

Parameters:

clientId

toString

public String toString()

Overrides:

RetryPolicy.toString()

Applies to