public interface AggregateEventStream
| Modifier and Type | Method and Description |
|---|---|
default Stream<Event> |
asStream()
Returns a Stream that consumes the Events from this instance.
|
void |
cancel()
Close this stream for further reading, notifying the provider of Events to stop streaming them.
|
boolean |
hasNext()
Indicates whether a new event is available.
|
Event |
next()
Returns the next available event, possibly blocking until one becomes available for reading.
|
Event next() throws InterruptedException
InterruptedException - if the current thread was interrupted while waiting for an event to become
availableStreamClosedException - when the stream has reached the end or was closed for another reasonto verify availability of eventsboolean hasNext()
true if a message is available, or false if the stream has reached the endStreamClosedException - if the stream has been closed prematurely because of an error or on client requestvoid cancel()
Note that after calling cancel, hasNext() may throw a StreamClosedException if the
cancellation caused the stream to close before the last message was received.
default Stream<Event> asStream()
Copyright © 2020–2022 AxonIQ BV. All rights reserved.