public static class QuartzDeadlineManager.Builder extends Object
QuartzDeadlineManager
.
The TransactionManager
is defaulted to a NoTransactionManager
and the
DeadlineManagerSpanFactory
defaults to a DefaultDeadlineManagerSpanFactory
backed by a
NoOpSpanFactory
.
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 |
spanFactory(DeadlineManagerSpanFactory spanFactory)
Sets the
SpanFactory implementation to use for providing tracing capabilities. |
QuartzDeadlineManager.Builder |
spanFactory(SpanFactory spanFactory)
Deprecated.
Use
spanFactory(DeadlineManagerSpanFactory) which provides more configuration options. |
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
@Deprecated public QuartzDeadlineManager.Builder spanFactory(@Nonnull SpanFactory spanFactory)
spanFactory(DeadlineManagerSpanFactory)
which provides more configuration options.SpanFactory
implementation to use for providing tracing capabilities. Defaults to a
NoOpSpanFactory
by default, which provides no tracing capabilities.spanFactory
- The SpanFactory
implementationpublic QuartzDeadlineManager.Builder spanFactory(@Nonnull DeadlineManagerSpanFactory spanFactory)
SpanFactory
implementation to use for providing tracing capabilities. Defaults to a
DefaultDeadlineManagerSpanFactory
backed by a NoOpSpanFactory
by default, which provides no
tracing capabilities.spanFactory
- The SpanFactory
implementationpublic 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–2024. All rights reserved.