Class CassandraRowStream

java.lang.Object
io.vertx.mutiny.cassandra.CassandraRowStream
All Implemented Interfaces:
MutinyDelegate, ReadStream<com.datastax.oss.driver.api.core.cql.Row>, StreamBase

public class CassandraRowStream extends Object implements ReadStream<com.datastax.oss.driver.api.core.cql.Row>, MutinyDelegate
A ReadStream for Row consumption.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

Author:
Pavel Drankou, Thomas Segismont
See Also:
  • CassandraRowStream
  • Field Details

  • Constructor Details

    • CassandraRowStream

      public CassandraRowStream(io.vertx.cassandra.CassandraRowStream delegate)
      Create a new instance of CassandraRowStream delegating to the given (non-null) instance of CassandraRowStream.
    • CassandraRowStream

      public CassandraRowStream(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.cassandra.CassandraRowStream getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Specified by:
      getDelegate in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
      Specified by:
      getDelegate in interface StreamBase
      Returns:
      the delegate instance
    • pipeTo

      @CheckReturnValue public io.smallrye.mutiny.Uni<Void> pipeTo(WriteStream<com.datastax.oss.driver.api.core.cql.Row> dst)

      Unlike the bare Vert.x variant, this method returns a Uni. The uni emits the result of the operation as item. If the operation fails, the uni emits the failure.

      Don't forget to subscribe on it to trigger the operation.

      Specified by:
      pipeTo in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
      Parameters:
      dst - the destination write stream
      Returns:
      A Uni representing the asynchronous result of this operation.
      See Also:
      • io.vertx.cassandra.CassandraRowStream#pipeTo(WriteStream)
    • pipeToAndAwait

      public void pipeToAndAwait(WriteStream<com.datastax.oss.driver.api.core.cql.Row> dst)

      Unlike the bare Vert.x variant, this method returns a Void. This method awaits indefinitely for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).

      See Also:
      • io.vertx.cassandra.CassandraRowStream#pipeTo(WriteStream)
    • pipeToAndForget

      public CassandraRowStream pipeToAndForget(WriteStream<com.datastax.oss.driver.api.core.cql.Row> dst)

      Unlike the bare Vert.x variant, this method ignores the Void result or any failure.

      Returns:
      The current instance to chain operations if needed.
      See Also:
      • io.vertx.cassandra.CassandraRowStream#pipeTo(WriteStream)
    • exceptionHandler

      public CassandraRowStream exceptionHandler(Consumer<Throwable> handler)
      Description copied from interface: ReadStream
      Set an exception handler on the read stream.
      Specified by:
      exceptionHandler in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
      Specified by:
      exceptionHandler in interface StreamBase
      Parameters:
      handler - the exception handler. Can be null.
      Returns:
      a reference to this, so the API can be used fluently
    • handler

      public CassandraRowStream handler(Consumer<com.datastax.oss.driver.api.core.cql.Row> handler)
      Description copied from interface: ReadStream
      Set a data handler. As data is read, the handler will be called with the data.
      Specified by:
      handler in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
      Returns:
      a reference to this, so the API can be used fluently
    • pause

      public CassandraRowStream pause()
      Description copied from interface: ReadStream
      Pause the 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.

      Specified by:
      pause in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
      Returns:
      a reference to this, so the API can be used fluently
    • resume

      public CassandraRowStream resume()
      Description copied from interface: ReadStream
      Resume reading, and sets the buffer in flowing mode.

      If the ReadStream has been paused, reading will recommence on it.

      Specified by:
      resume in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
      Returns:
      a reference to this, so the API can be used fluently
    • endHandler

      public CassandraRowStream endHandler(Runnable handler)
      Description copied from interface: ReadStream
      Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called.
      Specified by:
      endHandler in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
      Returns:
      a reference to this, so the API can be used fluently
    • fetch

      public CassandraRowStream fetch(long l)
      Description copied from interface: ReadStream
      Fetch the specified 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.
      Specified by:
      fetch in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
      Returns:
      a reference to this, so the API can be used fluently
    • executionInfo

      public com.datastax.oss.driver.api.core.cql.ExecutionInfo executionInfo()
      Get the ExecutionInfo provided by the backing ResultSet for this stream.
    • columnDefinitions

      public com.datastax.oss.driver.api.core.cql.ColumnDefinitions columnDefinitions()
      Get the ColumnDefinitions provided by the backing ResultSet for this stream.
    • pipe

      public Pipe<com.datastax.oss.driver.api.core.cql.Row> pipe()
      Pause this stream and return a Pipe to transfer the elements of this stream to a destination WriteStream.

      The stream will be resumed when the pipe will be wired to a WriteStream.

      Specified by:
      pipe in interface ReadStream<com.datastax.oss.driver.api.core.cql.Row>
      Returns:
      a pipe
    • newInstance

      public static CassandraRowStream newInstance(io.vertx.cassandra.CassandraRowStream delegate)
      Creates a new instance of the CassandraRowStream.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toMulti

      @CheckReturnValue public io.smallrye.mutiny.Multi<com.datastax.oss.driver.api.core.cql.Row> toMulti()
    • toBlockingIterable

      public Iterable<com.datastax.oss.driver.api.core.cql.Row> toBlockingIterable()
    • toBlockingStream

      public Stream<com.datastax.oss.driver.api.core.cql.Row> toBlockingStream()