public static class QuartzDeadlineManager.Builder extends Object
QuartzDeadlineManager
.
The TransactionManager
is defaulted to a NoTransactionManager
.
The Scheduler
, ScopeAwareProvider
and Serializer
are hard requirements and as such
should be provided.
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
QuartzDeadlineManager |
build()
Initializes a
QuartzDeadlineManager as specified through this Builder. |
QuartzDeadlineManager.Builder |
refireImmediatelyPolicy(Predicate<Throwable> refireImmediatelyPolicy)
Sets a
Predicate taking a Throwable to decided whether a failed DeadlineJob should
be 'refired' immediately. |
QuartzDeadlineManager.Builder |
scheduler(org.quartz.Scheduler scheduler)
Sets the
Scheduler used for scheduling and triggering purposes of the deadlines. |
QuartzDeadlineManager.Builder |
scopeAwareProvider(ScopeAwareProvider scopeAwareProvider)
Sets the
ScopeAwareProvider which is capable of providing a stream of
Scope instances for a given ScopeDescriptor . |
QuartzDeadlineManager.Builder |
serializer(Serializer serializer)
Sets the
Serializer used to de-/serialize the DeadlineMessage and the ScopeDescriptor
into the JobDataMap . |
QuartzDeadlineManager.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 QuartzDeadlineManager.Builder scheduler(org.quartz.Scheduler scheduler)
Scheduler
used for scheduling and triggering purposes of the deadlines.scheduler
- a Scheduler
used for scheduling and triggering purposes of the deadlinespublic QuartzDeadlineManager.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 QuartzDeadlineManager.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 QuartzDeadlineManager.Builder serializer(Serializer serializer)
Serializer
used to de-/serialize the DeadlineMessage
and the ScopeDescriptor
into the JobDataMap
.serializer
- a Serializer
used to de-/serialize the DeadlineMessage
and the
ScopeDescriptor
into the JobDataMap
public QuartzDeadlineManager.Builder refireImmediatelyPolicy(Predicate<Throwable> refireImmediatelyPolicy)
Predicate
taking a Throwable
to decided whether a failed DeadlineJob
should
be 'refired' immediately. Defaults to a Predicate which will refire immediately on
non-AxonNonTransientException
s.refireImmediatelyPolicy
- a Predicate
taking a Throwable
to decided whether a failed
DeadlineJob
should be 'refired' immediatelypublic QuartzDeadlineManager build()
QuartzDeadlineManager
as specified through this Builder.QuartzDeadlineManager
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–2022. All rights reserved.