OptionalwritesThe records flush writes: a read of one from the store (IStore.getState) flushes first, so a reader never sees them without the held writes.
Only the records the held writes change - a reader of anything else, including the writer itself deciding what to hold, reads as it would. A read made through a transaction (ITransaction.getState) sees that transaction and does not flush.
OptionalflushMake the writes the caller holds for this transaction, into it.
The caller holds writes to make them together; the store calls this whenever something needs them made: before another transaction begins inside this one, before this one commits, and before a read of a record the writes change (writes). A flush writes by beginning transactions inside this one; those do not flush it again.
OptionalonCalled each time a transaction begun directly inside this one commits, while this one is still open.
The transaction that committed. It has closed: what this hook writes begins inside this transaction, and is itself reported here when it commits.
What child, and everything nested in it, recorded with
ITransaction.setIntent, on its own. The operation's intents
(ITransaction.getIntent) hold the union.
For a caller that reacts to each step of an operation as it happens, rather than once when it lands (onCommit). Deeper transactions are part of the step that holds them and are not reported on their own. A child that rolls back is not reported.
OptionalonCalled once the operation this transaction belongs to has landed.
The root's commit. An operation that wrote nothing is elided but still counts as landed.
OptionalonCalled when this transaction, or any transaction it is nested in, rolls back.
Callbacks a transaction is begun with, called by the store as the transaction and the operation it belongs to settle.
Remarks
A nested transaction is a savepoint: committing it merges its writes into its parent, where they can still be rolled back with an outer transaction. So the outcome hooks report the OPERATION's outcome - onCommit once the root lands, onRollback when this transaction or any one it is nested in rolls back - and only one of them is ever called.