Class Command

java.lang.Object
io.fluxzero.common.api.Request
io.fluxzero.common.api.Command
All Implemented Interfaces:
JsonType
Direct Known Subclasses:
AdoptModelMigration, Append, AppendEvents, BulkUpdateDocuments, CancelSchedule, CommitModels, CreateAuditTrail, DeleteCollection, DeleteDocumentById, DeleteDocuments, DeleteEvents, DeleteModel, DeleteValue, DisconnectTracker, IndexDocuments, MoveDocumentById, MoveDocuments, RepairRelationships, ResetPosition, RewriteModelGraphDocument, Schedule, SetRetentionTime, StorePosition, StoreValueIfAbsent, StoreValues, StoreValuesAndWait, Truncate, UpdateRelationships

public abstract class Command extends Request
Base class for commands sent to the Fluxzero Runtime.

A Command represents a request to perform a state-changing operation on the Runtime, such as indexing a document, deleting entries, or creating audit trails.

All commands inherit from Request and are assigned a unique Request.requestId to support correlation and observability.

Each command defines a getGuarantee() which indicates how delivery or storage of the command should be handled (e.g. whether to wait until it's stored).

Optionally, a routingKey() may be provided to direct the command to a specific processing node or partition based on a domain-specific identifier (such as a document or collection ID). This helps with consistent hashing or sharding of work in the Runtime.

See Also:
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    Command(long requestId)
    Restores a request identifier while decoding an optimized transport representation.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract Guarantee
    Indicates the delivery guarantee required for this command.
    Optionally specifies a routing key for this command, which may be used to partition work or apply consistent hashing when processed in the Fluxzero Runtime.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface JsonType

    toMetric
  • Constructor Details

    • Command

      protected Command()
    • Command

      protected Command(long requestId)
      Restores a request identifier while decoding an optimized transport representation.
  • Method Details

    • getGuarantee

      public abstract Guarantee getGuarantee()
      Indicates the delivery guarantee required for this command.
      Returns:
      the Guarantee level (e.g. STORED, SENT, NONE)
    • routingKey

      public String routingKey()
      Optionally specifies a routing key for this command, which may be used to partition work or apply consistent hashing when processed in the Fluxzero Runtime.
      Returns:
      a routing key string, or null if not specified