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
- Direct Known Subclasses:
CommitModelsWithAliasReads, CommitModelsWithDeadlines, CommitModelsWithDocumentProjections, CommitModelsWithIdentityReads, CommitModelsWithRelationships
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 TypeMethodDescriptionExplicit alias-owner observations; null owners record absence independently of primary IDs.longgetBytes()Returns the complete serialized event-message bytes carried once by this commit.Scheduler effects included atomically with this commit.Alias lookup keys consumed by this evaluation, independently of exact Model-head reads.Relationship selections read by the evaluation; ordinary commits carry no such dependencies.booleanhasExpiredReplacement(long cutoff) Whether a proposed replacement's original deadline has elapsed at commit acceptance.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.withDeadlineUpdates(List<ModelDeadlineUpdate> updates) Replaces scheduler effects while retaining explicit identity observations and all existing commit facets.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
-
getReadRelationships
Relationship selections read by the evaluation; ordinary commits carry no such dependencies. -
getReadAliasIds
-
withDeadlineUpdates
Replaces scheduler effects while retaining explicit identity observations and all existing commit facets. -
getDeadlineUpdates
Scheduler effects included atomically with this commit. Empty on ordinary commits. -
getAliasObservations
Explicit alias-owner observations; null owners record absence independently of primary IDs. -
hasExpiredReplacement
public boolean hasExpiredReplacement(long cutoff) Whether a proposed replacement's original deadline has elapsed at commit acceptance. -
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.
-