Package io.fluxcapacitor.common.api
Class Command
java.lang.Object
io.fluxcapacitor.common.api.Request
io.fluxcapacitor.common.api.Command
- All Implemented Interfaces:
JsonType
- Direct Known Subclasses:
Append
,AppendEvents
,BulkUpdateDocuments
,CancelSchedule
,CreateAuditTrail
,DeleteCollection
,DeleteDocumentById
,DeleteDocuments
,DeleteEvents
,DeleteValue
,DisconnectTracker
,IndexDocuments
,RepairRelationships
,ResetPosition
,Schedule
,SetRetentionTime
,StorePosition
,StoreValueIfAbsent
,StoreValues
,StoreValuesAndWait
,UpdateRelationships
Base class for commands sent to the Flux platform.
A Command
represents a request to perform a state-changing operation on the platform, 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 platform.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract 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 Flux platform.
-
Constructor Details
-
Command
public Command()
-
-
Method Details
-
getGuarantee
Indicates the delivery guarantee required for this command.- Returns:
- the
Guarantee
level (e.g.STORED
,SENT
,NONE
)
-
routingKey
Optionally specifies a routing key for this command, which may be used to partition work or apply consistent hashing when processed in the Flux platform.- Returns:
- a routing key string, or
null
if not specified
-