This pull request does numerous things for the MessageStream interface and its implementations.
A large part is "cleanup and finetuning," which includes variable/parameter/method/class renaming, JavaDoc additions and expansion, indentation changes, and method ordering adjustments.
Importantly, a bunch of tests have been included in the MessageStreamTest suite, as well as a couple of missing implementations of this test suite.
Lastly, the MessageStream#reduce(R identity, BiFunction<R, M, R> accumulator) method, with implementations and tests, has been introduced in this PR.
This reduce operation is a logical necessity for the repositories, which will retrieve a MessageStream<EventMessage<?>> from the Event Store and are required to reduce this stream into a single model instance.
The MessageStream#reduce introduction makes the resolution of this PR a blocker for #3101.
By doing the above, and more (with the reduce introduction), this pull request resolves #3063.
This pull request does numerous things for the
MessageStream
interface and its implementations. A large part is "cleanup and finetuning," which includes variable/parameter/method/class renaming, JavaDoc additions and expansion, indentation changes, and method ordering adjustments.Importantly, a bunch of tests have been included in the
MessageStreamTest
suite, as well as a couple of missing implementations of this test suite.Lastly, the
MessageStream#reduce(R identity, BiFunction<R, M, R> accumulator)
method, with implementations and tests, has been introduced in this PR. This reduce operation is a logical necessity for the repositories, which will retrieve aMessageStream<EventMessage<?>>
from the Event Store and are required to reduce this stream into a single model instance.The
MessageStream#reduce
introduction makes the resolution of this PR a blocker for #3101.By doing the above, and more (with the reduce introduction), this pull request resolves #3063.