Class DefaultModelRepository.Commit
java.lang.Object
io.fluxzero.sdk.persisting.repository.DefaultModelRepository.Commit
- Enclosing class:
DefaultModelRepository
Converts a side-effect-free
CommitAttempt evaluation into one authoritative runtime commit package.
The original event payload is serialized once per substep. Per-target stream membership remains separate, while global publication is the union of all targeted model publication policies. Optional direct documents and snapshots travel with the same package. The runtime durably retains incomplete materialization work and reports completion before a successful model commit returns, preserving immediate direct-search visibility across retries and restarts.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe one repository-owned carrier from prepared request through authoritative accepted result. -
Constructor Summary
ConstructorsConstructorDescriptionCommit(EventStoreClient eventStoreClient, Serializer serializer, DocumentSerializer documentSerializer, DispatchInterceptor dispatchInterceptor, String source, Serializer snapshotSerializer, GraphProjectionCompletion graphProjectionCompletion) -
Method Summary
Modifier and TypeMethodDescriptionbeginBatch(int producers) CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>> commit(String commitId, CommitAttempt evaluation) CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>> commit(String commitId, CommitAttempt evaluation, io.fluxzero.common.api.modeling.ModelConflictPolicy conflictPolicy) CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>> commitPrepared(DefaultModelRepository.Commit.Outcome prepared, ModelCommitBatchingClient.ModelCommitBatch batch, int batchSlot) prepare(String commitId, CommitAttempt evaluation) prepare(String commitId, CommitAttempt evaluation, io.fluxzero.common.api.modeling.ModelConflictPolicy conflictPolicy) prepare(String commitId, CommitAttempt evaluation, io.fluxzero.common.api.modeling.ModelConflictPolicy conflictPolicy, boolean migration) prepare(String commitId, CommitAttempt evaluation, io.fluxzero.common.api.modeling.ModelConflictPolicy conflictPolicy, boolean migration, boolean existingEvent) prepareRebased(String commitId, DefaultModelRepository.Commit.Outcome original, CommitAttempt evaluation) CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>> trackLocalCommit(CommitAttempt attempt, DeserializingMessage message, boolean migration, Supplier<CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>>> operation) Keeps tracker fencing around the complete commit and retry lifecycle.CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>> trackLocalCommit(CommitAttempt attempt, DeserializingMessage message, boolean migration, Supplier<CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>>> operation, Runnable afterCommit) Releases process-local commit ordering after cache/tracker publication and before optional Graph waiting.
-
Constructor Details
-
Commit
public Commit(EventStoreClient eventStoreClient, Serializer serializer, DocumentSerializer documentSerializer, DispatchInterceptor dispatchInterceptor, String source, Serializer snapshotSerializer, GraphProjectionCompletion graphProjectionCompletion)
-
-
Method Details
-
commit
public CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>> commit(String commitId, CommitAttempt evaluation) -
commit
public CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>> commit(String commitId, CommitAttempt evaluation, io.fluxzero.common.api.modeling.ModelConflictPolicy conflictPolicy) -
commitPrepared
public CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>> commitPrepared(DefaultModelRepository.Commit.Outcome prepared, ModelCommitBatchingClient.ModelCommitBatch batch, int batchSlot) -
beginBatch
-
beginReadyBatch
-
trackLocalCommit
public CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>> trackLocalCommit(CommitAttempt attempt, DeserializingMessage message, boolean migration, Supplier<CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>>> operation) Keeps tracker fencing around the complete commit and retry lifecycle. -
trackLocalCommit
public CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>> trackLocalCommit(CommitAttempt attempt, DeserializingMessage message, boolean migration, Supplier<CompletableFuture<Optional<io.fluxzero.common.api.modeling.CommitModelsResult>>> operation, Runnable afterCommit) Releases process-local commit ordering after cache/tracker publication and before optional Graph waiting. -
prepare
-
prepare
public DefaultModelRepository.Commit.Outcome prepare(String commitId, CommitAttempt evaluation, io.fluxzero.common.api.modeling.ModelConflictPolicy conflictPolicy) -
prepare
public DefaultModelRepository.Commit.Outcome prepare(String commitId, CommitAttempt evaluation, io.fluxzero.common.api.modeling.ModelConflictPolicy conflictPolicy, boolean migration) -
prepare
public DefaultModelRepository.Commit.Outcome prepare(String commitId, CommitAttempt evaluation, io.fluxzero.common.api.modeling.ModelConflictPolicy conflictPolicy, boolean migration, boolean existingEvent) -
prepareRebased
public DefaultModelRepository.Commit.Outcome prepareRebased(String commitId, DefaultModelRepository.Commit.Outcome original, CommitAttempt evaluation)
-