Class CommitModels

All Implemented Interfaces:
JsonType, RetryAwareRequest

public class CommitModels extends Command implements 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.

  • Constructor Details

  • Method Details

    • markPossibleDuplicate

      public void markPossibleDuplicate()
      Description copied from interface: RetryAwareRequest
      Marks the same logical request as a possible retry before it is sent again.
      Specified by:
      markPossibleDuplicate in interface RetryAwareRequest
    • routingKey

      public String routingKey()
      Routes retries of the same commit consistently without choosing one target model as its owner.
      Overrides:
      routingKey in class Command
      Returns:
      a routing key string, or null if not specified
    • getBytes

      public long getBytes()
      Returns the complete serialized event-message bytes carried once by this commit.
    • singleTarget

      public ModelCommitTarget singleTarget()
      Returns the sole target when this commit has one substep with one target, otherwise null.
    • toMetric

      public CommitModels.Metric toMetric()
      Returns a payload-free representation for operational metrics.
      Specified by:
      toMetric in interface JsonType
      Returns:
      a safe and compact object suitable for serialization to the metrics log