public class QueryResultBuffer extends Object implements QueryResultStream
This class is intended for internal use. Be cautious.
Constructor and Description |
---|
QueryResultBuffer()
Constructs a
QueryResultBuffer |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
fail(EventStoreException exception) |
boolean |
hasNext(int timeout,
TimeUnit timeUnit)
Validates whether there is a following entry in this stream to consume.
|
QueryResult |
next()
Returns the following
QueryResult from this stream. |
void |
push(io.axoniq.axonserver.grpc.event.QueryEventsResponse eventWithToken) |
void |
registerCloseListener(Consumer<QueryResultBuffer> closeCallback) |
void |
registerConsumeListener(Consumer<Integer> consumeListener) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
hasNext
forEachRemaining, remove
public QueryResultBuffer()
QueryResultBuffer
public boolean hasNext(int timeout, TimeUnit timeUnit)
QueryResultStream
timeout
with the
given unit
to wait to respondhasNext
in interface QueryResultStream
true
if there is another entry, false
if there isn't for at the given durationpublic QueryResult next()
QueryResultStream
QueryResult
from this stream. Might return null
if nothing is presentnext
in interface Iterator<QueryResult>
next
in interface QueryResultStream
QueryResult
from this streampublic void close()
close
in interface AutoCloseable
public void registerCloseListener(Consumer<QueryResultBuffer> closeCallback)
public void push(io.axoniq.axonserver.grpc.event.QueryEventsResponse eventWithToken)
public void fail(EventStoreException exception)
Copyright © 2010–2020. All rights reserved.