Class DefaultRepositorySpanFactory.Builder

java.lang.Object
org.axonframework.modelling.command.DefaultRepositorySpanFactory.Builder
Enclosing class:
DefaultRepositorySpanFactory

public static class DefaultRepositorySpanFactory.Builder extends Object
Builder class to instantiate a DefaultRepositorySpanFactory. The default values are:
  • aggregateIdAttribute defaults to axon.aggregateId
The spanFactory is a required field and should be provided.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • spanFactory

      public DefaultRepositorySpanFactory.Builder spanFactory(org.axonframework.tracing.SpanFactory spanFactory)
      Sets the SpanFactory to use to create the spans. This is a required field.
      Parameters:
      spanFactory - The SpanFactory to use to create the spans.
      Returns:
      The current Builder instance, for fluent interfacing.
    • aggregateIdAttribute

      public DefaultRepositorySpanFactory.Builder aggregateIdAttribute(String aggregateIdAttribute)
      Sets the attribute name to use for the aggregate id. Defaults to axon.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 a DefaultRepositorySpanFactory as specified through this Builder.
      Returns:
      The DefaultRepositorySpanFactory as specified through this Builder.