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 interface |
DefaultRetryHandler.RetryOperation<T> |
Modifier and Type | Field and Description |
---|---|
protected BackoffPolicy |
backoffPolicy |
protected BiPredicate<? super RecordedBinding,Exception> |
bindingRecoveryRetryCondition |
protected DefaultRetryHandler.RetryOperation<?> |
bindingRecoveryRetryOperation |
protected BiPredicate<? super RecordedConsumer,Exception> |
consumerRecoveryRetryCondition |
protected DefaultRetryHandler.RetryOperation<?> |
consumerRecoveryRetryOperation |
protected BiPredicate<? super RecordedExchange,Exception> |
exchangeRecoveryRetryCondition |
protected DefaultRetryHandler.RetryOperation<?> |
exchangeRecoveryRetryOperation |
protected BiPredicate<? super RecordedQueue,Exception> |
queueRecoveryRetryCondition |
protected DefaultRetryHandler.RetryOperation<?> |
queueRecoveryRetryOperation |
protected int |
retryAttempts |
Constructor and Description |
---|
DefaultRetryHandler(BiPredicate<? super RecordedQueue,Exception> queueRecoveryRetryCondition,
BiPredicate<? super RecordedExchange,Exception> exchangeRecoveryRetryCondition,
BiPredicate<? super RecordedBinding,Exception> bindingRecoveryRetryCondition,
BiPredicate<? super RecordedConsumer,Exception> consumerRecoveryRetryCondition,
DefaultRetryHandler.RetryOperation<?> queueRecoveryRetryOperation,
DefaultRetryHandler.RetryOperation<?> exchangeRecoveryRetryOperation,
DefaultRetryHandler.RetryOperation<?> bindingRecoveryRetryOperation,
DefaultRetryHandler.RetryOperation<?> consumerRecoveryRetryOperation,
int retryAttempts,
BackoffPolicy backoffPolicy) |
Modifier and Type | Method and Description |
---|---|
protected RetryResult |
doRetry(BiPredicate<RecordedEntity,Exception> condition,
DefaultRetryHandler.RetryOperation<?> operation,
RecordedEntity 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.
|
protected final BiPredicate<? super RecordedQueue,Exception> queueRecoveryRetryCondition
protected final BiPredicate<? super RecordedExchange,Exception> exchangeRecoveryRetryCondition
protected final BiPredicate<? super RecordedBinding,Exception> bindingRecoveryRetryCondition
protected final BiPredicate<? super RecordedConsumer,Exception> consumerRecoveryRetryCondition
protected final DefaultRetryHandler.RetryOperation<?> queueRecoveryRetryOperation
protected final DefaultRetryHandler.RetryOperation<?> exchangeRecoveryRetryOperation
protected final DefaultRetryHandler.RetryOperation<?> bindingRecoveryRetryOperation
protected final DefaultRetryHandler.RetryOperation<?> consumerRecoveryRetryOperation
protected final int retryAttempts
protected final BackoffPolicy backoffPolicy
public DefaultRetryHandler(BiPredicate<? super RecordedQueue,Exception> queueRecoveryRetryCondition, BiPredicate<? super RecordedExchange,Exception> exchangeRecoveryRetryCondition, BiPredicate<? super RecordedBinding,Exception> bindingRecoveryRetryCondition, BiPredicate<? super RecordedConsumer,Exception> 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 RetryResult doRetry(BiPredicate<RecordedEntity,Exception> condition, DefaultRetryHandler.RetryOperation<?> operation, RecordedEntity entity, RetryContext context) throws Exception
Exception
protected void log(RecordedEntity entity, Exception exception, int attempts)
Copyright © 2022 VMware, Inc. or its affiliates.. All rights reserved.