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: an aggregate is one once its first stream committed.
It refuses what the durable logs refuse, before it writes anything, with an IllegalArgumentException: given its context, a stream of another bounded context; and in appendAll, a group of more than one context, or whose streams of one aggregate skip a version (requireChains). Without a context it takes streams of any context, one append at a time, as a test that keeps several contexts in one log does.
Properties
Functions
The streams appended one at a time, as EventLog.appendAll does, once the group is one context's (the log's, when it has one) and each aggregate's streams in it come in consecutive versions.
No claim: a request is keyed per (tenant, request) and type, so a second attempt under another id meets it.
Whether a stream of type was appended: the store of a type's history is its streams.
One read under the lock: the tail and the earlier request keys of the same moment.