public static class SimpleDeadlineManager.Builder extends Object
SimpleDeadlineManager
.
The ScheduledExecutorService
is defaulted to an Executors.newSingleThreadScheduledExecutor()
which contains an AxonThreadFactory
, and the TransactionManager
defaults to a
NoTransactionManager
. The ScopeAwareProvider
is a hard requirement and as such should be
provided.
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SimpleDeadlineManager |
build()
Initializes a
SimpleDeadlineManager as specified through this Builder. |
SimpleDeadlineManager.Builder |
scheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
Sets the
ScheduledExecutorService used for scheduling and triggering deadlines. |
SimpleDeadlineManager.Builder |
scopeAwareProvider(ScopeAwareProvider scopeAwareProvider)
Sets the
ScopeAwareProvider which is capable of providing a stream of
Scope instances for a given ScopeDescriptor . |
SimpleDeadlineManager.Builder |
transactionManager(TransactionManager transactionManager)
Sets the
TransactionManager used to build transactions and ties them to deadline. |
protected void |
validate()
Validates whether the fields contained in this Builder are set accordingly.
|
public SimpleDeadlineManager.Builder scopeAwareProvider(ScopeAwareProvider scopeAwareProvider)
ScopeAwareProvider
which is capable of providing a stream of
Scope
instances for a given ScopeDescriptor
. Used to return the
right Scope to trigger a deadline in.scopeAwareProvider
- a ScopeAwareProvider
used to find the right
Scope
to trigger a deadline inpublic SimpleDeadlineManager.Builder scheduledExecutorService(ScheduledExecutorService scheduledExecutorService)
ScheduledExecutorService
used for scheduling and triggering deadlines. Defaults to a
Executors.newSingleThreadScheduledExecutor()
, containing an AxonThreadFactory
.scheduledExecutorService
- a ScheduledExecutorService
used for scheduling and triggering
deadlinespublic SimpleDeadlineManager.Builder transactionManager(TransactionManager transactionManager)
TransactionManager
used to build transactions and ties them to deadline. Defaults to a
NoTransactionManager
.transactionManager
- a TransactionManager
used to build transactions and ties them to deadlinepublic SimpleDeadlineManager build()
SimpleDeadlineManager
as specified through this Builder.SimpleDeadlineManager
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–2018. All rights reserved.