Rulvar API reference / @rulvar/effects / FakeEffectProvider
Class: FakeEffectProvider
Defined in: packages/effects/src/fakes.ts:58
Implements
Constructors
Constructor
new FakeEffectProvider(descriptor): FakeEffectProvider;Defined in: packages/effects/src/fakes.ts:77
Parameters
| Parameter | Type |
|---|---|
descriptor | EffectProviderDescriptor |
Returns
FakeEffectProvider
Properties
| Property | Modifier | Type | Default value | Description | Defined in |
|---|---|---|---|---|---|
descriptor | readonly | EffectProviderDescriptor | undefined | - | packages/effects/src/fakes.ts:59 |
dispatches | public | number | 0 | Provider contacts, the kill point 7 counter. | packages/effects/src/fakes.ts:66 |
lateFenced | public | number | 0 | Late sends the provider's own fencing refused or deduped. | packages/effects/src/fakes.ts:71 |
lateLandings | public | number | 0 | Late sends that landed as provider effects (the 'neither' hazard). | packages/effects/src/fakes.ts:69 |
lookups | public | number | 0 | - | packages/effects/src/fakes.ts:67 |
nextBehavior | public | FakeDispatchBehavior | 'commit' | - | packages/effects/src/fakes.ts:72 |
stallNextSend | public | boolean | false | Capture the next send in flight instead of executing it. | packages/effects/src/fakes.ts:74 |
Methods
closeAcceptance()
closeAcceptance(request): Promise<EffectLookupAnswer>;Defined in: packages/effects/src/fakes.ts:232
The acceptance-closing primitive (query then cancel): after this resolves with found: false, late bytes for this effect are unacceptable at the provider, which is the ONLY thing that makes a negative answer final (RFC section 4.4).
Parameters
| Parameter | Type |
|---|---|
request | EffectLookupRequest |
Returns
Promise<EffectLookupAnswer>
Implementation of
dispatch()
dispatch(request): Promise<EffectDispatchResult>;Defined in: packages/effects/src/fakes.ts:130
Sends one attempt. Called ONLY by the dispatcher, ONLY with the seq of an attempt record it just appended.
Parameters
| Parameter | Type |
|---|---|
request | EffectDispatchRequest |
Returns
Promise<EffectDispatchResult>
Implementation of
effectCount()
effectCount(logicalKey): number;Defined in: packages/effects/src/fakes.ts:82
How many committed effects exist for one logical key.
Parameters
| Parameter | Type |
|---|---|
logicalKey | string |
Returns
number
lookup()
lookup(request): Promise<EffectLookupAnswer>;Defined in: packages/effects/src/fakes.ts:221
Queries the provider for the effect's truth, when the row offers it.
Parameters
| Parameter | Type |
|---|---|
request | EffectLookupRequest |
Returns
Promise<EffectLookupAnswer>
Implementation of
releaseStalled()
releaseStalled(): void;Defined in: packages/effects/src/fakes.ts:199
Releases every stalled send NOW, long after capture: the stale sender transmitting after any amount of waiting. The provider's own fencing decides what the late bytes do, exactly as in production: a dedup key dedupes, a closed acceptance refuses the specific attempt, a unique natural key refuses the duplicate, and a 'neither' provider lets the late effect LAND.
Returns
void