public class RowStreamImpl extends Object implements RowStream<Row>, Handler<AsyncResult<RowSet<Row>>>
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the stream and release the resources.
|
void |
close(Handler<AsyncResult<Void>> completionHandler)
Close the stream and release the resources.
|
RowStream<Row> |
endHandler(Handler<Void> handler)
Set an end handler.
|
RowStream<Row> |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
RowStream<Row> |
fetch(long amount)
Fetch the specified
amount of elements. |
void |
handle(AsyncResult<RowSet<Row>> ar)
Something has happened, so handle it.
|
RowStream<Row> |
handler(Handler<Row> handler)
Set a data handler.
|
RowStream<Row> |
pause()
Pause the
ReadStream, it sets the buffer in fetch mode and clears the actual demand. |
RowStream<Row> |
resume()
Resume reading, and sets the buffer in
flowing mode. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpipe, pipeTo, pipeTopublic RowStream<Row> exceptionHandler(Handler<Throwable> handler)
ReadStreamexceptionHandler in interface ReadStream<Row>exceptionHandler in interface StreamBaseexceptionHandler in interface RowStream<Row>handler - the exception handlerpublic RowStream<Row> handler(Handler<Row> handler)
ReadStreampublic RowStream<Row> pause()
ReadStreamReadStream, it sets the buffer in fetch mode and clears the actual demand.
While it's paused, no data will be sent to the data handler.
public RowStream<Row> fetch(long amount)
ReadStreamamount of elements. If the ReadStream has been paused, reading will
recommence with the specified amount of items, otherwise the specified amount will
be added to the current stream demand.fetch in interface ReadStream<Row>public RowStream<Row> resume()
ReadStreamflowing mode.
If the ReadStream has been paused, reading will recommence on it.public RowStream<Row> endHandler(Handler<Void> handler)
ReadStreamendHandler in interface ReadStream<Row>endHandler in interface RowStream<Row>public void handle(AsyncResult<RowSet<Row>> ar)
Handlerhandle in interface Handler<AsyncResult<RowSet<Row>>>ar - the event to handlepublic void close()
RowStreamCopyright © 2020. All rights reserved.