public static class JobRunrDeadlineManager.Builder extends Object
JobRunrDeadlineManager.
The TransactionManager is defaulted to a NoTransactionManager and the SpanFactory
defaults to a NoOpSpanFactory.
The JobScheduler, ScopeAwareProvider and Serializer are hard requirements and as
such should be provided.
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
JobRunrDeadlineManager |
build()
Initializes a
JobRunrDeadlineManager as specified through this Builder. |
JobRunrDeadlineManager.Builder |
jobScheduler(org.jobrunr.scheduling.JobScheduler jobScheduler)
Sets the
JobScheduler used for scheduling and triggering purposes of the deadlines. |
JobRunrDeadlineManager.Builder |
scopeAwareProvider(ScopeAwareProvider scopeAwareProvider)
Sets the
ScopeAwareProvider which is capable of providing a stream of
Scope instances for a given ScopeDescriptor. |
JobRunrDeadlineManager.Builder |
serializer(Serializer serializer)
Sets the
Serializer used to de-/serialize the payload,
MetaData and the ScopeDescriptor into the DeadlineDetails
as well as the whole DeadlineDetails itself. |
JobRunrDeadlineManager.Builder |
spanFactory(SpanFactory spanFactory)
Sets the
SpanFactory implementation to use for providing tracing capabilities. |
JobRunrDeadlineManager.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 JobRunrDeadlineManager.Builder jobScheduler(org.jobrunr.scheduling.JobScheduler jobScheduler)
JobScheduler used for scheduling and triggering purposes of the deadlines.jobScheduler - a JobScheduler used for scheduling and triggering purposes of the deadlinespublic JobRunrDeadlineManager.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 JobRunrDeadlineManager.Builder serializer(Serializer serializer)
Serializer used to de-/serialize the payload,
MetaData and the ScopeDescriptor into the DeadlineDetails
as well as the whole DeadlineDetails itself.serializer - a Serializer used to de-/serialize the payload,
MetaData and the ScopeDescriptor into the
DeadlineDetails, as well as the whole DeadlineDetails itself.public JobRunrDeadlineManager.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 JobRunrDeadlineManager.Builder spanFactory(@Nonnull SpanFactory spanFactory)
SpanFactory implementation to use for providing tracing capabilities. Defaults to a
NoOpSpanFactory by default, which provides no tracing capabilities.spanFactory - The SpanFactory implementationpublic JobRunrDeadlineManager build()
JobRunrDeadlineManager as specified through this Builder.JobRunrDeadlineManager 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–2023. All rights reserved.