Class AxonServerEventStoreFactory
java.lang.Object
org.axonframework.axonserver.connector.event.axon.AxonServerEventStoreFactory
A factory towards
AxonServerEventStores.
Especially useful to open a store towards a context differing from the default context. For example, whenever the application is required to publish "milestone-"/"integration-events" in a common context.
- Since:
- 4.9.0
- Author:
- Steven van Beelen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceContract definingAxonServerEventStore.Builderbased configuration when constructing anAxonServerEventStore.static classBuilder class to instantiate anAxonServerEventStoreFactory. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedInstantiate aAxonServerEventStoreFactorybased on the fields contained in theAxonServerEventStoreFactory.Builder. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Instantiate a builder to construct anAxonServerEventStoreFactory.constructFor(String context) Constructs anAxonServerEventStoreconnected to the givencontext.constructFor(String context, AxonServerEventStoreFactory.AxonServerEventStoreConfiguration configuration) Constructs anAxonServerEventStoreconnected to the givencontextwith customization based on the givenconfiguration.
-
Constructor Details
-
AxonServerEventStoreFactory
Instantiate aAxonServerEventStoreFactorybased on the fields contained in theAxonServerEventStoreFactory.Builder.Will assert that the
AxonServerConfiguration,AxonServerConnectionManager, andSnapshotFilterare set. If not, anAxonConfigurationExceptionwill be thrown.- Parameters:
builder- TheAxonServerEventStoreFactory.Builderused to instantiate aAxonServerEventStoreFactoryinstance
-
-
Method Details
-
builder
Instantiate a builder to construct anAxonServerEventStoreFactory.The following fields have sensible defaults:
- The
snapshot serializerdefaults to aXStreamSerializer - The
event serializerdefaults to aXStreamSerializer - The
upcaster chaindefaults to aNoOpEventUpcaster - The
message monitordefaults to aNoOpMessageMonitor - The
span factorydefaults to aDefaultEventBusSpanFactoryusing aNoOpSpanFactory.
AxonServerConfiguration,AxonServerConnectionManager, andSnapshotFilterare hard requirements and as such should be provided.- Returns:
- A builder to construct an
AxonServerEventStoreFactory.
- The
-
constructFor
Constructs anAxonServerEventStoreconnected to the givencontext.The other required fields for an
AxonServerEventStoreare based on the components configured in this factory- Parameters:
context- The context to construct anAxonServerEventStorefor.- Returns:
- A new
AxonServerEventStoreconnected to the givencontext.
-
constructFor
public AxonServerEventStore constructFor(@Nonnull String context, @Nonnull AxonServerEventStoreFactory.AxonServerEventStoreConfiguration configuration) Constructs anAxonServerEventStoreconnected to the givencontextwith customization based on the givenconfiguration.The other required fields for an
AxonServerEventStoreare based on the components configured in this factory- Parameters:
context- The context to construct anAxonServerEventStorefor.configuration- The customization for the store under construction, deviating from the components set in theAxonServerEventStoreFactory.Builder.- Returns:
- A new
AxonServerEventStoreconnected to the givencontext.
-