ApplyStaged class final
The command was accepted and placed into a transaction to be run later.
ApplyStaged is the "holding receipt" returned when an action is submitted inside an active ApplyTransactionScope. It signifies that the command has passed initial checks but its final result won't be known until the transaction is committed.
In the framework's biological metaphor, this represents a Stored Signal— a nervous impulse that has been captured and is waiting for a "go" signal from the system to finally trigger a mutation.
Why it is used
- Atomic Updates: It allows the framework to group many different changes together so they all happen at the exact same moment.
- Conflict Prevention: By staging commands first, the framework can ensure that complex, multi-step changes don't leave the reactive graph in a half-finished, "broken" state if an error occurs.
- Transaction Tracking: It provides a receipt immediately, allowing you to track the command's place in the ledger even before it executes.
How it works
When Cell.apply is called with a transaction scope (tx), the framework
does not run the function immediately. Instead, it creates this staged
outcome and adds the command to the transaction's queue. The receipt
will include a txSequence number to show where this command sits in
the transaction.
Technical Details
- Result Type
Never: Because the command hasn't run yet, there is no return value. ApplyStaged extendsApplyOutcome<Never>to signal that theresultfield (available in ApplyAccepted) does not exist here. - Validation: Even though execution is delayed, the command is usually still "vetted" against safety gates before being staged.
See also:
- ApplyOutcome — The base type for all command results.
- ApplyAccepted — The outcome returned when a command actually succeeds.
- ApplyTransactionScope — The container that manages these staged commands.
- Inheritance
-
- Object
- ApplyOutcome<
Never> - ApplyStaged
Constructors
- ApplyStaged(ApplyReceipt receipt)
-
Creates a staged outcome for
receipt.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- receipt → ApplyReceipt
-
The forensic receipt of this submission.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited