InMemoryEventLog
An EventLog in memory, for tests and samples. Appends are serialized by one lock, so the sequence within a partition is trivially the order commits became visible. As the durable backends, it keeps the request key per aggregate type. Each partition keeps its PartitionLineage, PartitionLineage.ROOT as created. It keeps each stream's stamp, stamps the access attributes over a history and records each type's walk (AccessWalks) as the durable logs do; its aggregates are ordered by id, then tenant.
Properties
Functions
Link copied to clipboard
open suspend override fun aggregates(type: AggregateType, after: String?, limit: Int): AggregatePage
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open suspend override fun findByRequestId(type: AggregateType, tenantId: String, requestId: String): EventStreamRecord?
Link copied to clipboard
Whether a stream of type was appended: the store of a type's history is its streams.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun read(ref: AggregateRef, fromVersion: Int, toVersion: Int): Flow<EventStreamRecord>
Link copied to clipboard
Link copied to clipboard
open suspend override fun readTail(ref: AggregateRef, fromVersion: Int, earlier: Int): AggregateTail
One read under the lock: the tail and the earlier request keys of the same moment.
Link copied to clipboard