Class DefaultRepositorySpanFactory.Builder
java.lang.Object
org.axonframework.modelling.command.DefaultRepositorySpanFactory.Builder
- Enclosing class:
- DefaultRepositorySpanFactory
Builder class to instantiate a
DefaultRepositorySpanFactory. The default values are:
aggregateIdAttributedefaults toaxon.aggregateId
spanFactory is a required field and should be provided.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaggregateIdAttribute(String aggregateIdAttribute) Sets the attribute name to use for the aggregate id.build()Initializes aDefaultRepositorySpanFactoryas specified through this Builder.spanFactory(org.axonframework.tracing.SpanFactory spanFactory) Sets theSpanFactoryto use to create the spans.protected voidvalidate()Validates whether the fields contained in this Builder are set accordingly.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
spanFactory
public DefaultRepositorySpanFactory.Builder spanFactory(org.axonframework.tracing.SpanFactory spanFactory) Sets theSpanFactoryto use to create the spans. This is a required field.- Parameters:
spanFactory- TheSpanFactoryto use to create the spans.- Returns:
- The current Builder instance, for fluent interfacing.
-
aggregateIdAttribute
Sets the attribute name to use for the aggregate id. Defaults toaxon.aggregateId.- Parameters:
aggregateIdAttribute- The attribute name to use for the aggregate id.- Returns:
- The current Builder instance, for fluent interfacing.
-
validate
protected void validate()Validates whether the fields contained in this Builder are set accordingly. -
build
Initializes aDefaultRepositorySpanFactoryas specified through this Builder.- Returns:
- The
DefaultRepositorySpanFactoryas specified through this Builder.
-