io.vertx.reactivex.cassandra

## Class CassandraClient

- java.lang.Object
- - io.vertx.reactivex.cassandra.CassandraClient

-     public class CassandraClient
      extends Object

  Eclipse Vert.x Cassandra client.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<CassandraClient>` | `__TYPE_ARG`
    `static String` | `DEFAULT_POOL_NAME` The name of the default pool

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CassandraClient(CassandraClient delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CassandraClient` | `connect()` Connect to a Cassandra service.
    `CassandraClient` | `connect(Handler<AsyncResult<Void>> connectHandler)` Connect to a Cassandra service.
    `CassandraClient` | `connect(String keyspace, Handler<AsyncResult<Void>> connectHandler)` Connect to a Cassandra service.
    `static CassandraClient` | `createNonShared(Vertx vertx)` Like `createNonShared(io.vertx.reactivex.core.Vertx)` but with default client options.
    `static CassandraClient` | `createNonShared(Vertx vertx, CassandraClientOptions cassandraClientOptions)` Create a Cassandra client which maintains its own data source.
    `static CassandraClient` | `createShared(Vertx vertx)` Like `createShared(io.vertx.reactivex.core.Vertx)`, but with default client options and datasource.
    `static CassandraClient` | `createShared(Vertx vertx, CassandraClientOptions cassandraClientOptions)` Like `createShared(io.vertx.reactivex.core.Vertx)`, but with datasource name.
    `static CassandraClient` | `createShared(Vertx vertx, String datasourceName)` Like `createShared(io.vertx.reactivex.core.Vertx)`, but with default client options.
    `static CassandraClient` | `createShared(Vertx vertx, String datasourceName, CassandraClientOptions cassandraClientOptions)` Create a Cassandra client which shares its data source with any other Cassandra clients created with the same data source name.
    `CassandraClient` | `disconnect()` Disconnects from the Cassandra service.
    `CassandraClient` | `disconnect(Handler<AsyncResult<Void>> disconnectHandler)` Disconnects from the Cassandra service.
    `boolean` | `equals(Object o)`
    `CassandraClient` | `execute(com.datastax.driver.core.Statement statement, Handler<AsyncResult<ResultSet>> resultHandler)` Execute the statement and provide a handler for consuming results.
    `CassandraClient` | `execute(String query, Handler<AsyncResult<ResultSet>> resultHandler)` Execute the query and provide a handler for consuming results.
    `CassandraClient` | `executeWithFullFetch(com.datastax.driver.core.Statement statement, Handler<AsyncResult<List<com.datastax.driver.core.Row>>> resultHandler)` Execute the query and provide a handler for consuming results.
    `CassandraClient` | `executeWithFullFetch(String query, Handler<AsyncResult<List<com.datastax.driver.core.Row>>> resultHandler)` Execute the query and provide a handler for consuming results.
    `CassandraClient` | `getDelegate()`
    `int` | `hashCode()`
    `boolean` | `isConnected()`
    `static CassandraClient` | `newInstance(CassandraClient arg)`
    `CassandraClient` | `prepare(String query, Handler<AsyncResult<com.datastax.driver.core.PreparedStatement>> resultHandler)` Prepares the provided query string.
    `CassandraClient` | `queryStream(com.datastax.driver.core.Statement statement, Handler<AsyncResult<CassandraRowStream>> rowStreamHandler)` Executes the given SQL statement which returns the results of the query as a read stream.
    `CassandraClient` | `queryStream(String sql, Handler<AsyncResult<CassandraRowStream>> rowStreamHandler)` Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.
    `Completable` | `rxConnect()` Connect to a Cassandra service.
    `Completable` | `rxConnect(String keyspace)` Connect to a Cassandra service.
    `Completable` | `rxDisconnect()` Disconnects from the Cassandra service.
    `Single<ResultSet>` | `rxExecute(com.datastax.driver.core.Statement statement)` Execute the statement and provide a handler for consuming results.
    `Single<ResultSet>` | `rxExecute(String query)` Execute the query and provide a handler for consuming results.
    `Single<List<com.datastax.driver.core.Row>>` | `rxExecuteWithFullFetch(com.datastax.driver.core.Statement statement)` Execute the query and provide a handler for consuming results.
    `Single<List<com.datastax.driver.core.Row>>` | `rxExecuteWithFullFetch(String query)` Execute the query and provide a handler for consuming results.
    `Single<com.datastax.driver.core.PreparedStatement>` | `rxPrepare(String query)` Prepares the provided query string.
    `Single<CassandraRowStream>` | `rxQueryStream(com.datastax.driver.core.Statement statement)` Executes the given SQL statement which returns the results of the query as a read stream.
    `Single<CassandraRowStream>` | `rxQueryStream(String sql)` Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<CassandraClient> __TYPE_ARG

    - #### DEFAULT_POOL_NAME

          public static final String DEFAULT_POOL_NAME

      The name of the default pool
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### CassandraClient

          public CassandraClient(CassandraClient delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public CassandraClient getDelegate()

    - #### createNonShared

          public static CassandraClient createNonShared(Vertx vertx)

      Like `createNonShared(io.vertx.reactivex.core.Vertx)` but with default client options.
      Parameters:
        `vertx` -
      Returns:

    - #### createNonShared

          public static CassandraClient createNonShared(Vertx vertx,
                                                        CassandraClientOptions cassandraClientOptions)

      Create a Cassandra client which maintains its own data source.

      It is not recommended to create several non shared clients in an application. Your application should either use only single non shared client, or use shared client. This is because `CassandraClient` backed by `Session`. And Datastax does not recommended to have several `Session` instances. Better to have only one, and share it.

      Parameters:
        `vertx` - the Vert.x instance
        `cassandraClientOptions` - the options
      Returns:
        the client

    - #### createShared

          public static CassandraClient createShared(Vertx vertx)

      Like `createShared(io.vertx.reactivex.core.Vertx)`, but with default client options and datasource.
      Parameters:
        `vertx` -
      Returns:

    - #### createShared

          public static CassandraClient createShared(Vertx vertx,
                                                     String datasourceName)

      Like `createShared(io.vertx.reactivex.core.Vertx)`, but with default client options.
      Parameters:
        `vertx` -
        `datasourceName` -
      Returns:

    - #### createShared

          public static CassandraClient createShared(Vertx vertx,
                                                     CassandraClientOptions cassandraClientOptions)

      Like `createShared(io.vertx.reactivex.core.Vertx)`, but with datasource name.
      Parameters:
        `vertx` -
        `cassandraClientOptions` -
      Returns:

    - #### createShared

          public static CassandraClient createShared(Vertx vertx,
                                                     String datasourceName,
                                                     CassandraClientOptions cassandraClientOptions)

      Create a Cassandra client which shares its data source with any other Cassandra clients created with the same data source name.
      Parameters:
        `vertx` - the Vert.x instance
        `datasourceName` - the data source name
        `cassandraClientOptions` - the options
      Returns:
        the client

    - #### connect

          public CassandraClient connect()

      Connect to a Cassandra service.
      Returns:
        current Cassandra client instance

    - #### isConnected

          public boolean isConnected()

      Returns:
        whether this Cassandra client instance connected.

    - #### connect

          public CassandraClient connect(Handler<AsyncResult<Void>> connectHandler)

      Connect to a Cassandra service.
      Parameters:
        `connectHandler` - handler called when asynchronous connect call ends
      Returns:
        current Cassandra client instance

    - #### rxConnect

          public Completable rxConnect()

      Connect to a Cassandra service.
      Returns:
        current Cassandra client instance

    - #### connect

          public CassandraClient connect(String keyspace,
                                         Handler<AsyncResult<Void>> connectHandler)

      Connect to a Cassandra service.
      Parameters:
        `keyspace` - The name of the keyspace to use for the created connection.
        `connectHandler` - handler called when asynchronous connect call ends
      Returns:
        current Cassandra client instance

    - #### rxConnect

          public Completable rxConnect(String keyspace)

      Connect to a Cassandra service.
      Parameters:
        `keyspace` - The name of the keyspace to use for the created connection.
      Returns:
        current Cassandra client instance

    - #### execute

          public CassandraClient execute(String query,
                                         Handler<AsyncResult<ResultSet>> resultHandler)

      Execute the query and provide a handler for consuming results.
      Parameters:
        `query` - the query to execute
        `resultHandler` - handler called when result of execution is present, but can be not fully fetched
      Returns:
        current Cassandra client instance

    - #### rxExecute

          public Single<ResultSet> rxExecute(String query)

      Execute the query and provide a handler for consuming results.
      Parameters:
        `query` - the query to execute
      Returns:
        current Cassandra client instance

    - #### queryStream

          public CassandraClient queryStream(String sql,
                                             Handler<AsyncResult<CassandraRowStream>> rowStreamHandler)

      Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.
      Parameters:
        `sql` - the SQL to execute. For example `SELECT * FROM table ...`.
        `rowStreamHandler` - the handler which is called once the operation completes. It will return an instance of `CassandraRowStream`.
      Returns:
        current Cassandra client instance

    - #### rxQueryStream

          public Single<CassandraRowStream> rxQueryStream(String sql)

      Executes the given SQL `SELECT` statement which returns the results of the query as a read stream.
      Parameters:
        `sql` - the SQL to execute. For example `SELECT * FROM table ...`.
      Returns:
        current Cassandra client instance

    - #### disconnect

          public CassandraClient disconnect()

      Disconnects from the Cassandra service.
      Returns:
        current Cassandra client instance

    - #### disconnect

          public CassandraClient disconnect(Handler<AsyncResult<Void>> disconnectHandler)

      Disconnects from the Cassandra service.
      Parameters:
        `disconnectHandler` - handler called when asynchronous disconnect call ends
      Returns:
        current Cassandra client instance

    - #### rxDisconnect

          public Completable rxDisconnect()

      Disconnects from the Cassandra service.
      Returns:
        current Cassandra client instance

    - #### executeWithFullFetch

          public CassandraClient executeWithFullFetch(String query,
                                                      Handler<AsyncResult<List<com.datastax.driver.core.Row>>> resultHandler)

      Execute the query and provide a handler for consuming results.
      Parameters:
        `query` - the query to execute
        `resultHandler` - handler called when result of execution is fully fetched.
      Returns:
        current Cassandra client instance

    - #### rxExecuteWithFullFetch

          public Single<List<com.datastax.driver.core.Row>> rxExecuteWithFullFetch(String query)

      Execute the query and provide a handler for consuming results.
      Parameters:
        `query` - the query to execute
      Returns:
        current Cassandra client instance

    - #### executeWithFullFetch

          public CassandraClient executeWithFullFetch(com.datastax.driver.core.Statement statement,
                                                      Handler<AsyncResult<List<com.datastax.driver.core.Row>>> resultHandler)

      Execute the query and provide a handler for consuming results.
      Parameters:
        `statement` - the statement to execute
        `resultHandler` - handler called when result of execution is fully fetched.
      Returns:
        current Cassandra client instance

    - #### rxExecuteWithFullFetch

          public Single<List<com.datastax.driver.core.Row>> rxExecuteWithFullFetch(com.datastax.driver.core.Statement statement)

      Execute the query and provide a handler for consuming results.
      Parameters:
        `statement` - the statement to execute
      Returns:
        current Cassandra client instance

    - #### execute

          public CassandraClient execute(com.datastax.driver.core.Statement statement,
                                         Handler<AsyncResult<ResultSet>> resultHandler)

      Execute the statement and provide a handler for consuming results.
      Parameters:
        `statement` - the statement to execute
        `resultHandler` - handler called when result of execution is present
      Returns:
        current Cassandra client instance

    - #### rxExecute

          public Single<ResultSet> rxExecute(com.datastax.driver.core.Statement statement)

      Execute the statement and provide a handler for consuming results.
      Parameters:
        `statement` - the statement to execute
      Returns:
        current Cassandra client instance

    - #### prepare

          public CassandraClient prepare(String query,
                                         Handler<AsyncResult<com.datastax.driver.core.PreparedStatement>> resultHandler)

      Prepares the provided query string.
      Parameters:
        `query` - the query to prepare
        `resultHandler` - handler called when result of query preparation is present
      Returns:
        current Cassandra client instance

    - #### rxPrepare

          public Single<com.datastax.driver.core.PreparedStatement> rxPrepare(String query)

      Prepares the provided query string.
      Parameters:
        `query` - the query to prepare
      Returns:
        current Cassandra client instance

    - #### queryStream

          public CassandraClient queryStream(com.datastax.driver.core.Statement statement,
                                             Handler<AsyncResult<CassandraRowStream>> rowStreamHandler)

      Executes the given SQL statement which returns the results of the query as a read stream.
      Parameters:
        `statement` - the statement to execute.
        `rowStreamHandler` - the handler which is called once the operation completes. It will return an instance of `CassandraRowStream`.
      Returns:
        current Cassandra client instance

    - #### rxQueryStream

          public Single<CassandraRowStream> rxQueryStream(com.datastax.driver.core.Statement statement)

      Executes the given SQL statement which returns the results of the query as a read stream.
      Parameters:
        `statement` - the statement to execute.
      Returns:
        current Cassandra client instance

    - #### newInstance

          public static CassandraClient newInstance(CassandraClient arg)

Copyright © 2018 Eclipse. All rights reserved.