Package org.axonframework.modelling.saga
Class DefaultSagaManagerSpanFactory
java.lang.Object
org.axonframework.modelling.saga.DefaultSagaManagerSpanFactory
- All Implemented Interfaces:
SagaManagerSpanFactory
Default implementation of the
SagaManagerSpanFactory. The attribute used for the saga identifier can be
configured.- Since:
- 4.9.0
- Author:
- Mitchell Herrijgers
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class to instantiate aDefaultSagaManagerSpanFactory. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newDefaultSagaManagerSpanFactoryusing the providedbuilder. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a newDefaultSagaManagerSpanFactory.Builderto build aDefaultSagaManagerSpanFactorywith.createCreateSagaInstanceSpan(EventMessage<?> event, Class<?> sagaType, String sagaIdentifier) Creates a span that represents the creation of a new saga instance.createInvokeSagaSpan(EventMessage<?> event, Class<?> sagaType, Saga<?> saga) Creates a span that represents the invocation of a saga.
-
Constructor Details
-
DefaultSagaManagerSpanFactory
Creates a newDefaultSagaManagerSpanFactoryusing the providedbuilder.- Parameters:
builder- The builder to build theDefaultSagaManagerSpanFactoryfrom.
-
-
Method Details
-
builder
Creates a newDefaultSagaManagerSpanFactory.Builderto build aDefaultSagaManagerSpanFactorywith. The default values are:sagaIdentifierAttributedefaults toaxon.sagaIdentifier
spanFactoryis a required field and should be provided.- Returns:
- The
DefaultSagaManagerSpanFactory.Builderto build aDefaultSagaManagerSpanFactorywith.
-
createCreateSagaInstanceSpan
public Span createCreateSagaInstanceSpan(EventMessage<?> event, Class<?> sagaType, String sagaIdentifier) Description copied from interface:SagaManagerSpanFactoryCreates a span that represents the creation of a new saga instance.- Specified by:
createCreateSagaInstanceSpanin interfaceSagaManagerSpanFactory- Parameters:
event- The event that triggered the creation of the saga.sagaType- The type of the saga.sagaIdentifier- The identifier of the saga.- Returns:
- The created span.
-
createInvokeSagaSpan
Description copied from interface:SagaManagerSpanFactoryCreates a span that represents the invocation of a saga.- Specified by:
createInvokeSagaSpanin interfaceSagaManagerSpanFactory- Parameters:
event- The event that triggered the invocation of the saga.sagaType- The type of the saga.saga- The saga that will be invoked.- Returns:
- The created span.
-