Class DefaultRepositorySpanFactory
java.lang.Object
org.axonframework.modelling.command.DefaultRepositorySpanFactory
- All Implemented Interfaces:
RepositorySpanFactory
Default implementation of the
RepositorySpanFactory. The attribute used for the identifier of the aggregate
can be configured.- Since:
- 4.9.0
- Author:
- Mitchell Herrijgers
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class to instantiate aDefaultRepositorySpanFactory. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a newDefaultRepositorySpanFactoryusing the providedbuilder. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a newDefaultRepositorySpanFactory.Builderto build aDefaultRepositorySpanFactorywith.createInitializeStateSpan(String aggregateType, String aggregateId) Creates a span that represents the time it took to hydrate the aggregate with data from, for example, the event store.createLoadSpan(String aggregateId) Creates a span that represents the loading of an aggregate with the provided identifier.createObtainLockSpan(String aggregateId) Creates a span that represents the time waiting to acquire a lock on an aggregate with the provided identifier.
-
Constructor Details
-
DefaultRepositorySpanFactory
Creates a newDefaultRepositorySpanFactoryusing the providedbuilder.- Parameters:
builder- The builder to build theDefaultRepositorySpanFactoryfrom.
-
-
Method Details
-
builder
Creates a newDefaultRepositorySpanFactory.Builderto build aDefaultRepositorySpanFactorywith. The default values are:aggregateIdAttributedefaults toaxon.aggregateId
spanFactoryis a required field and should be provided.- Returns:
- The
DefaultRepositorySpanFactory.Builderto build aDefaultRepositorySpanFactorywith.
-
createLoadSpan
Description copied from interface:RepositorySpanFactoryCreates a span that represents the loading of an aggregate with the provided identifier.- Specified by:
createLoadSpanin interfaceRepositorySpanFactory- Parameters:
aggregateId- The identifier of the aggregate that is being loaded.- Returns:
- A span that represents the loading of the aggregate.
-
createObtainLockSpan
Description copied from interface:RepositorySpanFactoryCreates a span that represents the time waiting to acquire a lock on an aggregate with the provided identifier.- Specified by:
createObtainLockSpanin interfaceRepositorySpanFactory- Parameters:
aggregateId- The identifier of the aggregate that is trying to acquire a lock.- Returns:
- A span that represents the acquisition of the lock for the aggregate.
-
createInitializeStateSpan
Description copied from interface:RepositorySpanFactoryCreates a span that represents the time it took to hydrate the aggregate with data from, for example, the event store.- Specified by:
createInitializeStateSpanin interfaceRepositorySpanFactory- Parameters:
aggregateType- The type of the aggregate that is being hydrated.aggregateId- The identifier of the aggregate that is being hydrated.- Returns:
- A span that represents the hydration of the aggregate.
-