public abstract class StreamUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <M> Stream<M> |
asStream(BlockingStream<M> messageStream)
Convert the given
messageStream to a regular java Stream . |
public static <M> Stream<M> asStream(BlockingStream<M> messageStream)
messageStream
to a regular java Stream
. Note that the returned
stream will block during iteration if the end of the stream is reached so take heed of this in production code.
Closing this Stream
will close the underling messageStream
as well.M
- The type of entry contained in the streammessageStream
- the input TrackingEventStream
Stream
after conversionCopyright © 2010–2019. All rights reserved.