public interface CassandraRowStream extends ReadStream<com.datastax.oss.driver.api.core.cql.Row>
ReadStream
for Row
consumption.Modifier and Type | Method and Description |
---|---|
com.datastax.oss.driver.api.core.cql.ColumnDefinitions |
columnDefinitions()
Get the
ColumnDefinitions provided by the backing ResultSet for this stream. |
CassandraRowStream |
endHandler(Handler<Void> handler)
Set an end handler.
|
CassandraRowStream |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
com.datastax.oss.driver.api.core.cql.ExecutionInfo |
executionInfo()
Get the
ExectionInfo provided by the backing ResultSet for this stream. |
CassandraRowStream |
fetch(long l)
Fetch the specified
amount of elements. |
CassandraRowStream |
handler(Handler<com.datastax.oss.driver.api.core.cql.Row> handler)
Set a data handler.
|
CassandraRowStream |
pause()
Pause the
ReadStream , it sets the buffer in fetch mode and clears the actual demand. |
default Future<Void> |
pipeTo(WriteStream<com.datastax.oss.driver.api.core.cql.Row> dst)
Same as
ReadStream.pipeTo(WriteStream, Handler) but returns a Future of the asynchronous result |
default void |
pipeTo(WriteStream<com.datastax.oss.driver.api.core.cql.Row> dst,
Handler<AsyncResult<Void>> handler)
Pipe this
ReadStream to the WriteStream . |
CassandraRowStream |
resume()
Resume reading, and sets the buffer in
flowing mode. |
collect, pipe
CassandraRowStream exceptionHandler(Handler<Throwable> handler)
ReadStream
exceptionHandler
in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
exceptionHandler
in interface StreamBase
handler
- the exception handlerCassandraRowStream handler(Handler<com.datastax.oss.driver.api.core.cql.Row> handler)
ReadStream
handler
in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
CassandraRowStream pause()
ReadStream
ReadStream
, 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
.
pause
in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
CassandraRowStream resume()
ReadStream
flowing
mode.
If the ReadStream
has been paused, reading will recommence on it.resume
in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
CassandraRowStream endHandler(Handler<Void> handler)
ReadStream
endHandler
in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
CassandraRowStream fetch(long l)
ReadStream
amount
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<com.datastax.oss.driver.api.core.cql.Row>
default Future<Void> pipeTo(WriteStream<com.datastax.oss.driver.api.core.cql.Row> dst)
ReadStream
ReadStream.pipeTo(WriteStream, Handler)
but returns a Future
of the asynchronous resultpipeTo
in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
default void pipeTo(WriteStream<com.datastax.oss.driver.api.core.cql.Row> dst, Handler<AsyncResult<Void>> handler)
ReadStream
ReadStream
to the WriteStream
.
Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the handler
will be
called with the result.
pipeTo
in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
dst
- the destination write streamcom.datastax.oss.driver.api.core.cql.ExecutionInfo executionInfo()
ExectionInfo
provided by the backing ResultSet
for this stream.com.datastax.oss.driver.api.core.cql.ColumnDefinitions columnDefinitions()
ColumnDefinitions
provided by the backing ResultSet
for this stream.Copyright © 2024 Eclipse. All rights reserved.