InMemoryOffsetStore
Defined in: src/persistence/projection/OffsetStore.ts:38
Reference offset store — keeps cursors in a process-local Map. Use this for tests or for projections whose offsets you’re happy to lose on restart (i.e. the projection always replays the full stream). Not thread-safe across processes.
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InMemoryOffsetStore():
InMemoryOffsetStore
Returns
Section titled “Returns”InMemoryOffsetStore
Methods
Section titled “Methods”clear()
Section titled “clear()”clear(
projection):Promise<void>
Defined in: src/persistence/projection/OffsetStore.ts:60
Forget every cursor for projectionName. Used by tests + reset tooling.
Parameters
Section titled “Parameters”projection
Section titled “projection”string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”loadOffset()
Section titled “loadOffset()”loadOffset(
projection,tag):Promise<Offset>
Defined in: src/persistence/projection/OffsetStore.ts:51
Parameters
Section titled “Parameters”projection
Section titled “projection”string
string
Returns
Section titled “Returns”Promise<Offset>
Implementation of
Section titled “Implementation of”loadSequence()
Section titled “loadSequence()”loadSequence(
projection,pid):Promise<number>
Defined in: src/persistence/projection/OffsetStore.ts:42
Parameters
Section titled “Parameters”projection
Section titled “projection”string
string
Returns
Section titled “Returns”Promise<number>
Implementation of
Section titled “Implementation of”saveOffset()
Section titled “saveOffset()”saveOffset(
projection,tag,offset):Promise<void>
Defined in: src/persistence/projection/OffsetStore.ts:54
Parameters
Section titled “Parameters”projection
Section titled “projection”string
string
offset
Section titled “offset”Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”saveSequence()
Section titled “saveSequence()”saveSequence(
projection,pid,seqNr):Promise<void>
Defined in: src/persistence/projection/OffsetStore.ts:45
Parameters
Section titled “Parameters”projection
Section titled “projection”string
string
number
Returns
Section titled “Returns”Promise<void>