Package org.axonframework.deadline
Class DefaultDeadlineManagerSpanFactory
java.lang.Object
org.axonframework.deadline.DefaultDeadlineManagerSpanFactory
- All Implemented Interfaces:
DeadlineManagerSpanFactory
Default implementation of the
DeadlineManagerSpanFactory. The attributes used for the id of the deadline and
the scope of the deadline are configurable.- Since:
- 4.9.0
- Author:
- Mitchell Herrijgers
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class to instantiate aDefaultDeadlineManagerSpanFactory. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newDefaultDeadlineManagerSpanFactoryusing the providedbuilder. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a newDefaultDeadlineManagerSpanFactory.Builderto build aDefaultDeadlineManagerSpanFactorywith.createCancelAllSpan(String deadlineName) Creates a span that represents the cancellation of all deadlines with a certain name.createCancelAllWithinScopeSpan(String deadlineName, ScopeDescriptor scopeDescriptor) Creates a span that represents the cancellation of all deadlines with a certain name within a certain scope.createCancelScheduleSpan(String deadlineName, String deadlineId) Creates a span that represents the cancellation of a specific deadline.createExecuteSpan(String deadlineName, String deadlineId, DeadlineMessage<?> deadlineMessage) Creates a span that represents the execution of a deadline.createScheduleSpan(String deadlineName, String deadlineId, DeadlineMessage<?> deadlineMessage) Creates a span that represents the scheduling of a deadline.<T> DeadlineMessage<T> propagateContext(DeadlineMessage<T> eventMessage) Propagates the context of the current span to the given deadline message.
-
Constructor Details
-
DefaultDeadlineManagerSpanFactory
Creates a newDefaultDeadlineManagerSpanFactoryusing the providedbuilder. The default values are:deadlineIdAttributedefaults toaxon.deadlineIdscopeAttributedefaults toaxon.deadlineScope
spanFactoryis a required field and should be provided.- Parameters:
builder- The builder to build theDefaultDeadlineManagerSpanFactoryfrom.
-
-
Method Details
-
builder
Creates a newDefaultDeadlineManagerSpanFactory.Builderto build aDefaultDeadlineManagerSpanFactorywith. The default values are:deadlineIdAttributedefaults toaxon.deadlineIdscopeAttributedefaults toaxon.deadlineScope
spanFactoryis a required field and should be provided.- Returns:
- The
DefaultDeadlineManagerSpanFactory.Builderto build aDefaultDeadlineManagerSpanFactorywith.
-
createScheduleSpan
public Span createScheduleSpan(String deadlineName, String deadlineId, DeadlineMessage<?> deadlineMessage) Description copied from interface:DeadlineManagerSpanFactoryCreates a span that represents the scheduling of a deadline.- Specified by:
createScheduleSpanin interfaceDeadlineManagerSpanFactory- Parameters:
deadlineName- The name of the deadline.deadlineId- The id of the deadline.deadlineMessage- The message of the deadline.- Returns:
- The created span.
-
createCancelScheduleSpan
Description copied from interface:DeadlineManagerSpanFactoryCreates a span that represents the cancellation of a specific deadline.- Specified by:
createCancelScheduleSpanin interfaceDeadlineManagerSpanFactory- Parameters:
deadlineName- The name of the deadline.deadlineId- The id of the deadline.- Returns:
- The created span.
-
createCancelAllSpan
Description copied from interface:DeadlineManagerSpanFactoryCreates a span that represents the cancellation of all deadlines with a certain name.- Specified by:
createCancelAllSpanin interfaceDeadlineManagerSpanFactory- Parameters:
deadlineName- The name of the deadlines.- Returns:
- The created span.
-
createCancelAllWithinScopeSpan
Description copied from interface:DeadlineManagerSpanFactoryCreates a span that represents the cancellation of all deadlines with a certain name within a certain scope.- Specified by:
createCancelAllWithinScopeSpanin interfaceDeadlineManagerSpanFactory- Parameters:
deadlineName- The name of the deadlines.scopeDescriptor- The scope descriptor of the deadlines.- Returns:
- The created span.
-
createExecuteSpan
public Span createExecuteSpan(String deadlineName, String deadlineId, DeadlineMessage<?> deadlineMessage) Description copied from interface:DeadlineManagerSpanFactoryCreates a span that represents the execution of a deadline.- Specified by:
createExecuteSpanin interfaceDeadlineManagerSpanFactory- Parameters:
deadlineName- The name of the deadline.deadlineId- The id of the deadline.deadlineMessage- The message of the deadline.- Returns:
- The created span.
-
propagateContext
Description copied from interface:DeadlineManagerSpanFactoryPropagates the context of the current span to the given deadline message.- Specified by:
propagateContextin interfaceDeadlineManagerSpanFactory- Type Parameters:
T- The type of the payload of the deadline message.- Parameters:
eventMessage- The deadline message to propagate the context to.- Returns:
- The deadline message with the propagated context.
-