public abstract static class AbstractRetryScheduler.Builder<B extends AbstractRetryScheduler.Builder> extends Object
RetryScheduler
implementations.
The default for maxRetryCount
is set to a single retry.
The ScheduledExecutorService
is a hard requirement and as such should be provided.
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
B |
maxRetryCount(int maxRetryCount)
Sets the maximum number of retries allowed for a single command.
|
B |
retryExecutor(ScheduledExecutorService retryExecutor)
Sets the
ScheduledExecutorService used to schedule a command retry. |
protected void |
validate()
Validate the fields.
|
public B retryExecutor(ScheduledExecutorService retryExecutor)
ScheduledExecutorService
used to schedule a command retry.retryExecutor
- a ScheduledExecutorService
used to schedule a command retrypublic B maxRetryCount(int maxRetryCount)
maxRetryCount
- an int
specifying the maximum number of retries allowed for a single commandprotected void validate() throws AxonConfigurationException
AbstractRetryScheduler
's constructor.AxonConfigurationException
- if validation fails.Copyright © 2010–2022. All rights reserved.