public static class NestingSpanFactory.Builder extends Object
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 and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
NestingSpanFactory |
build()
Executes the builder's configuration, creating the
NestingSpanFactory . |
NestingSpanFactory.Builder |
clock(Clock clock)
Configures the
Clock to use when determining the time passed since publication of an event and the
current time. |
NestingSpanFactory.Builder |
delegate(SpanFactory spanFactory)
Defines the delegate
SpanFactory to use, which actually provides the spans. |
NestingSpanFactory.Builder |
timeLimit(Duration timeLimit)
Configures the
Duration since original publishing of an event or deadline during which it should be
considered a nested span. |
protected void |
validate()
Validates whether the fields contained in this Builder are set accordingly.
|
public NestingSpanFactory.Builder delegate(@Nonnull SpanFactory spanFactory)
SpanFactory
to use, which actually provides the spans. This delegate is required
for the builder to be built correctly.spanFactory
- The SpanFactory
to configure for use.public NestingSpanFactory.Builder timeLimit(@Nonnull Duration timeLimit)
Duration
since 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.
timeLimit
- The amount of time before handling of an event should be considered a separate trace.public NestingSpanFactory.Builder clock(@Nonnull Clock clock)
Clock
to 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.
clock
- The Clock
to use when determining the time passed since publication of an event and the
current time.public NestingSpanFactory build()
NestingSpanFactory
.protected void validate()
AxonConfigurationException
- if one field is asserted to be incorrect, according to the Builder's
specificationsCopyright © 2010–2024. All rights reserved.