Class DefaultFluxzero
java.lang.Object
io.fluxzero.sdk.configuration.DefaultFluxzero
- All Implemented Interfaces:
Fluxzero, AutoCloseable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface Fluxzero
Fluxzero.GlobalMemoizationScope, Fluxzero.MemoizationKey -
Field Summary
Fields inherited from interface Fluxzero
applicationInstance, instance -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.fluxzero.common.RegistrationbeforeShutdown(Runnable task) Register a task to run before this Fluxzero instance is closed.static DefaultFluxzero.Builderbuilder()clock()Returns the clock used by Fluxzero to generate timestamps.voidclose(boolean silently) Closes this Fluxzero instance gracefully.customGateway(String topic) Returns the gateway for given custom message topic.executeModelAssertions(Message update) Executes model apply interceptors and immediate assertions without applying or committing the update.executeModelCommit(Message update) Executes one model commit without routing it through command handlers.executeModelCommit(Message update, String modelId, Class<?> modelType) Executes one model commit against an explicitly selected persisted model identity.executeModelCommits(List<Message> updates) Executes multiple independent model commits without routing them through command handlers.executeStoredModelEvent(Message event) Applies an event that was already accepted by its original command flow to independent models.tracking(io.fluxzero.common.MessageType messageType) Returns a client to assist with the tracking of a given message type.voidHave Fluxzero use the given Clock when generating timestamps, e.g. when creating aMessage.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Fluxzero
aggregateRepository, apply, cache, client, close, commandGateway, commitModelChanges, configuration, correlationDataProvider, documentStore, errorGateway, eventGateway, eventStore, execute, identityProvider, keyValueStore, memoization, messageScheduler, metricsGateway, modelRepository, propertySource, queryGateway, registerHandlers, registerHandlers, resultGateway, serializer, snapshotStore, taskScheduler, userProvider, webRequestGateway
-
Constructor Details
-
DefaultFluxzero
public DefaultFluxzero()
-
-
Method Details
-
builder
-
customGateway
Description copied from interface:FluxzeroReturns the gateway for given custom message topic.- Specified by:
customGatewayin interfaceFluxzero
-
tracking
-
withClock
-
clock
-
executeModelCommit
Description copied from interface:FluxzeroExecutes one model commit without routing it through command handlers.This is an infrastructure extension point used by
Fluxzero.assertAndApply(Object). Custom Fluxzero implementations that support independent models should override it.- Specified by:
executeModelCommitin interfaceFluxzero- Parameters:
update- message containing the model update- Returns:
- completion of the durable model commit
-
executeModelCommit
public CompletableFuture<Void> executeModelCommit(Message update, String modelId, Class<?> modelType) Description copied from interface:FluxzeroExecutes one model commit against an explicitly selected persisted model identity. This is the infrastructure extension used byGraph.assertAndApply(Object); custom implementations supporting independent models may override it alongsideFluxzero.executeModelCommit(Message).- Specified by:
executeModelCommitin interfaceFluxzero
-
executeModelCommits
Description copied from interface:FluxzeroExecutes multiple independent model commits without routing them through command handlers. The default implementation preserves compatibility for custom implementations by invokingFluxzero.executeModelCommit(Message)for every update. Implementations may override this to batch transport while retaining separate commit semantics.- Specified by:
executeModelCommitsin interfaceFluxzero- Parameters:
updates- messages containing independent model updates- Returns:
- completion after every durable model commit
-
executeStoredModelEvent
Description copied from interface:FluxzeroApplies an event that was already accepted by its original command flow to independent models. Assertions and apply interceptors are skipped, while regular@Applymethods and durable Model-event storage are preserved. The accepted event is not published again. This infrastructure hook is primarily used by replay and test fixtures.- Specified by:
executeStoredModelEventin interfaceFluxzero- Parameters:
event- previously accepted event to apply- Returns:
- completion of the durable model commit
-
executeModelAssertions
Description copied from interface:FluxzeroExecutes model apply interceptors and immediate assertions without applying or committing the update.This is an infrastructure extension point used by
Fluxzero.assertLegal(Object). Custom Fluxzero implementations that support independent models should override it.- Specified by:
executeModelAssertionsin interfaceFluxzero- Parameters:
update- message containing the model update to validate- Returns:
- completion of the validation-only model evaluation
-
beforeShutdown
Description copied from interface:FluxzeroRegister a task to run before this Fluxzero instance is closed.- Specified by:
beforeShutdownin interfaceFluxzero
-
close
-