Package org.axonframework.tracing
Class NestingSpanFactory.Builder
java.lang.Object
org.axonframework.tracing.NestingSpanFactory.Builder
- Enclosing class:
NestingSpanFactory
Creates a builder that will create a
NestingSpanFactory.
Requires the delegate SpanFactory to be configured.
The Clock defaults to the system utc time and the timeLimit Duration defaults to two minutes.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Executes the builder's configuration, creating theNestingSpanFactory.Configures theClockto use when determining the time passed since publication of an event and the current time.delegate(SpanFactory spanFactory) Defines the delegateSpanFactoryto use, which actually provides the spans.Configures theDurationsince original publishing of an event or deadline during which it should be considered a nested span.protected voidvalidate()Validates whether the fields contained in this Builder are set accordingly.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
delegate
Defines the delegateSpanFactoryto use, which actually provides the spans. This delegate is required for the builder to be built correctly.- Parameters:
spanFactory- TheSpanFactoryto configure for use.- Returns:
- The current Builder instance, for fluent interfacing.
-
timeLimit
Configures theDurationsince original publishing of an event or deadline during which it should be considered a nested span. After that duration, it will become its own separate trace.The time limit defaults to two minutes if not configured otherwise.
- Parameters:
timeLimit- The amount of time before handling of an event should be considered a separate trace.- Returns:
- The current Builder instance, for fluent interfacing.
-
clock
Configures theClockto use when determining the time passed since publication of an event and the current time.The clock defaults to system utc time if not configured otherwise.
- Parameters:
clock- TheClockto use when determining the time passed since publication of an event and the current time.- Returns:
- The current Builder instance, for fluent interfacing.
-
build
Executes the builder's configuration, creating theNestingSpanFactory.- Returns:
- The span factory.
-
validate
protected void validate()Validates whether the fields contained in this Builder are set accordingly.- Throws:
AxonConfigurationException- if one field is asserted to be incorrect, according to the Builder's specifications
-