Class CommitModels
java.lang.Object
io.fluxzero.common.api.Request
io.fluxzero.common.api.Command
io.fluxzero.common.api.modeling.CommitModels
- All Implemented Interfaces:
JsonType, RetryAwareRequest
Atomically commits the ordered state transitions produced by one model commit.
The request carries one persisted read boundary and the exact model IDs read while evaluating the commit. Each
ModelCommitStep contains its original event once, regardless of the number of targeted model streams.
Target transitions may also carry pre-serialized direct current-document mutations and snapshot candidates. The
runtime assigns their state-index fence, verifies snapshot boundaries, and completes them as part of the commit
workflow.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classPayload-free model commit metrics. -
Constructor Summary
ConstructorsConstructorDescriptionCommitModels(String commitId, long readStateIndex, List<String> readModelIds, List<ModelCommitStep> substeps, ModelConflictPolicy conflictPolicy, Guarantee guarantee, boolean possibleDuplicate) CommitModels(String commitId, long readStateIndex, List<String> readModelIds, List<ModelCommitStep> substeps, ModelConflictPolicy conflictPolicy, Guarantee guarantee, boolean possibleDuplicate, boolean migration) -
Method Summary
Modifier and TypeMethodDescriptionlonggetBytes()Returns the complete serialized event-message bytes carried once by this commit.voidMarks the same logical request as a possible retry before it is sent again.Routes retries of the same commit consistently without choosing one target model as its owner.Returns the sole target when this commit has one substep with one target, otherwisenull.toMetric()Returns a payload-free representation for operational metrics.Methods inherited from class Command
getGuarantee
-
Constructor Details
-
CommitModels
public CommitModels(String commitId, long readStateIndex, List<String> readModelIds, List<ModelCommitStep> substeps, ModelConflictPolicy conflictPolicy, Guarantee guarantee, boolean possibleDuplicate) -
CommitModels
@ConstructorProperties({"commitId","readStateIndex","readModelIds","substeps","conflictPolicy","guarantee","possibleDuplicate","migration"}) public CommitModels(String commitId, long readStateIndex, List<String> readModelIds, List<ModelCommitStep> substeps, ModelConflictPolicy conflictPolicy, Guarantee guarantee, boolean possibleDuplicate, boolean migration)
-
-
Method Details
-
markPossibleDuplicate
public void markPossibleDuplicate()Description copied from interface:RetryAwareRequestMarks the same logical request as a possible retry before it is sent again.- Specified by:
markPossibleDuplicatein interfaceRetryAwareRequest
-
routingKey
Routes retries of the same commit consistently without choosing one target model as its owner.- Overrides:
routingKeyin classCommand- Returns:
- a routing key string, or
nullif not specified
-
getBytes
public long getBytes()Returns the complete serialized event-message bytes carried once by this commit. -
singleTarget
Returns the sole target when this commit has one substep with one target, otherwisenull. -
toMetric
Returns a payload-free representation for operational metrics.
-