Documentation / @etherfold/processor-entities / StateFactories
Type Alias: StateFactories ​
StateFactories =
object
Defined in: packages/processor-entities/src/stateFactories.ts:58
The two factories, as a host's spec takes them.
Properties ​
createState ​
readonlycreateState: (context,patience,bundle?,published?) =>Promise<WritableStateStore>
Defined in: packages/processor-entities/src/stateFactories.ts:64
THE WRITER: the store, started from the published snapshot when the host hands one (openAndBootstrap, forwarding replaceLocal), and otherwise opened snapshot-aware, then CLAIMED (openForWriting) with the host's signal.
Parameters ​
context ​
patience ​
bundle? ​
published? ​
Returns ​
Promise<WritableStateStore>
openState ​
readonlyopenState: (context,bundle?) =>Promise<EntityReaderState>
Defined in: packages/processor-entities/src/stateFactories.ts:74
THE READER: the SAME store, opened snapshot-aware and then for READING, with its EntityStateView. No claim, no bootstrap, nothing fetched.
Parameters ​
context ​
bundle? ​
Returns ​
Promise<EntityReaderState>