public class QueryResultStreamAdapter extends Object implements QueryResultStream
QueryResultStream, wrapping a ResultStream of EventQueryResultEntry. Defers
calls to the given resultStream, adapting them to a QueryResult.| Constructor and Description |
|---|
QueryResultStreamAdapter(io.axoniq.axonserver.connector.ResultStream<io.axoniq.axonserver.connector.event.EventQueryResultEntry> resultStream)
Construct a
QueryResultStreamAdapter deferring calls to the given resultStream. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
hasNext(int timeout,
TimeUnit unit)
Validates whether there is a following entry in this stream to consume.
|
QueryResult |
next()
Returns the following
QueryResult from this stream. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithasNextforEachRemaining, removepublic QueryResultStreamAdapter(io.axoniq.axonserver.connector.ResultStream<io.axoniq.axonserver.connector.event.EventQueryResultEntry> resultStream)
QueryResultStreamAdapter deferring calls to the given resultStream.resultStream - the stream of EventQueryResultEntry to adapt to QueryResult instancespublic boolean hasNext(int timeout,
TimeUnit unit)
QueryResultStreamtimeout with the
given unit to wait to respondhasNext in interface QueryResultStreamtrue if there is another entry, false if there isn't for at the given durationpublic QueryResult next()
QueryResultStreamQueryResult from this stream. Might return null if nothing is presentnext in interface Iterator<QueryResult>next in interface QueryResultStreamQueryResult from this streampublic void close()
throws Exception
close in interface AutoCloseableExceptionCopyright © 2010–2023. All rights reserved.