public abstract class EventStreamUtils extends Object
Modifier and Type | Method and Description |
---|---|
static Stream<? extends DomainEventMessage<?>> |
asStream(DomainEventStream domainEventStream)
Convert the given
domainEventStream to a regular java Stream of domain event messages. |
static DomainEventStream |
upcastAndDeserializeDomainEvents(Stream<? extends DomainEventData<?>> eventEntryStream,
Serializer serializer,
EventUpcaster upcasterChain)
Upcasts and deserializes the given
eventEntryStream using the given serializer and
upcasterChain . |
public static DomainEventStream upcastAndDeserializeDomainEvents(Stream<? extends DomainEventData<?>> eventEntryStream, Serializer serializer, EventUpcaster upcasterChain)
eventEntryStream
using the given serializer
and
upcasterChain
.
The list of events returned contains lazy deserializing events for optimization purposes. Events represented with
unknown classes are ignored if skipUnknownTypes
is true
eventEntryStream
- the stream of entries containing the data of the serialized eventserializer
- the serializer to deserialize the event withupcasterChain
- the chain containing the upcasters to upcast the events withpublic static Stream<? extends DomainEventMessage<?>> asStream(DomainEventStream domainEventStream)
domainEventStream
to a regular java Stream
of domain event messages.domainEventStream
- the input DomainEventStream
Stream
after conversionCopyright © 2010–2024. All rights reserved.