public static class IntervalRetryScheduler.Builder extends Object
IntervalRetryScheduler.
The default for retryInterval is set to 100ms, while maxRetryCount gets a single retry.
The retryInterval, maxRetryCount and ScheduledExecutorService are
hard requirements and as such should be provided.
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
IntervalRetryScheduler |
build()
Initializes a
IntervalRetryScheduler as specified through this Builder. |
IntervalRetryScheduler.Builder |
maxRetryCount(int maxRetryCount)
Sets the maximum number of retries allowed for a single command, defaulted to 1.
|
IntervalRetryScheduler.Builder |
retryExecutor(ScheduledExecutorService retryExecutor)
Sets the
ScheduledExecutorService used to schedule a command retry. |
IntervalRetryScheduler.Builder |
retryInterval(int retryInterval)
Sets the retry interval in milliseconds at which to schedule a retry, defaulted to 100ms.
|
protected void |
validate()
Validates whether the fields contained in this Builder are set accordingly.
|
public IntervalRetryScheduler.Builder retryInterval(int retryInterval)
retryInterval - an int specifying the retry interval in milliseconds at which to schedule a
retrypublic IntervalRetryScheduler.Builder maxRetryCount(int maxRetryCount)
maxRetryCount - an int specifying the maximum number of retries allowed for a single commandpublic IntervalRetryScheduler.Builder retryExecutor(ScheduledExecutorService retryExecutor)
ScheduledExecutorService used to schedule a command retry.retryExecutor - a ScheduledExecutorService used to schedule a command retrypublic IntervalRetryScheduler build()
IntervalRetryScheduler as specified through this Builder.IntervalRetryScheduler as specified through this Builderprotected void validate()
throws AxonConfigurationException
AxonConfigurationException - if one field is asserted to be incorrect according to the Builder's
specificationsCopyright © 2010–2019. All rights reserved.