public class DefaultRetryHandler extends Object implements RetryHandler
See also TopologyRecoveryRetryHandlerBuilder
to easily create
instances and TopologyRecoveryRetryLogic
for ready-to-use
conditions and operations.
TopologyRecoveryRetryHandlerBuilder
,
TopologyRecoveryRetryLogic
Modifier and Type | Class and Description |
---|---|
static class |
DefaultRetryHandler.RetryCondition<E extends RecordedEntity> |
static class |
DefaultRetryHandler.RetryOperation<T> |
Constructor and Description |
---|
DefaultRetryHandler(DefaultRetryHandler.RetryCondition<? super RecordedQueue> queueRecoveryRetryCondition,
DefaultRetryHandler.RetryCondition<? super RecordedExchange> exchangeRecoveryRetryCondition,
DefaultRetryHandler.RetryCondition<? super RecordedBinding> bindingRecoveryRetryCondition,
DefaultRetryHandler.RetryCondition<? super RecordedConsumer> consumerRecoveryRetryCondition,
DefaultRetryHandler.RetryOperation<?> queueRecoveryRetryOperation,
DefaultRetryHandler.RetryOperation<?> exchangeRecoveryRetryOperation,
DefaultRetryHandler.RetryOperation<?> bindingRecoveryRetryOperation,
DefaultRetryHandler.RetryOperation<?> consumerRecoveryRetryOperation,
int retryAttempts,
BackoffPolicy backoffPolicy) |
Modifier and Type | Method and Description |
---|---|
protected <T extends RecordedEntity> |
doRetry(DefaultRetryHandler.RetryCondition<T> condition,
DefaultRetryHandler.RetryOperation<?> operation,
T entity,
RetryContext context) |
protected void |
log(RecordedEntity entity,
Exception exception,
int attempts) |
RetryResult |
retryBindingRecovery(RetryContext context)
Retry a failed binding recovery operation.
|
RetryResult |
retryConsumerRecovery(RetryContext context)
Retry a failed consumer recovery operation.
|
RetryResult |
retryExchangeRecovery(RetryContext context)
Retry a failed exchange recovery operation.
|
RetryResult |
retryQueueRecovery(RetryContext context)
Retry a failed queue recovery operation.
|
public DefaultRetryHandler(DefaultRetryHandler.RetryCondition<? super RecordedQueue> queueRecoveryRetryCondition, DefaultRetryHandler.RetryCondition<? super RecordedExchange> exchangeRecoveryRetryCondition, DefaultRetryHandler.RetryCondition<? super RecordedBinding> bindingRecoveryRetryCondition, DefaultRetryHandler.RetryCondition<? super RecordedConsumer> consumerRecoveryRetryCondition, DefaultRetryHandler.RetryOperation<?> queueRecoveryRetryOperation, DefaultRetryHandler.RetryOperation<?> exchangeRecoveryRetryOperation, DefaultRetryHandler.RetryOperation<?> bindingRecoveryRetryOperation, DefaultRetryHandler.RetryOperation<?> consumerRecoveryRetryOperation, int retryAttempts, BackoffPolicy backoffPolicy)
public RetryResult retryQueueRecovery(RetryContext context) throws Exception
RetryHandler
retryQueueRecovery
in interface RetryHandler
context
- the context of the retryException
- if the retry failspublic RetryResult retryExchangeRecovery(RetryContext context) throws Exception
RetryHandler
retryExchangeRecovery
in interface RetryHandler
context
- the context of the retryException
- if the retry failspublic RetryResult retryBindingRecovery(RetryContext context) throws Exception
RetryHandler
retryBindingRecovery
in interface RetryHandler
context
- the context of the retryException
- if the retry failspublic RetryResult retryConsumerRecovery(RetryContext context) throws Exception
RetryHandler
retryConsumerRecovery
in interface RetryHandler
context
- the context of the retryException
- if the retry failsprotected <T extends RecordedEntity> RetryResult doRetry(DefaultRetryHandler.RetryCondition<T> condition, DefaultRetryHandler.RetryOperation<?> operation, T entity, RetryContext context) throws Exception
Exception
protected void log(RecordedEntity entity, Exception exception, int attempts)
Copyright © 2020 VMware, Inc. or its affiliates.. All rights reserved.