Modifier and Type | Field and Description |
---|---|
static io.vertx.lang.rx.TypeArg<CassandraClient> |
__TYPE_ARG |
static String |
DEFAULT_SHARED_CLIENT_NAME
The default shared client name.
|
Constructor and Description |
---|
CassandraClient(CassandraClient delegate) |
CassandraClient(Object delegate) |
Modifier and Type | Method and Description |
---|---|
CassandraClient |
close()
Closes this client.
|
CassandraClient |
close(Handler<AsyncResult<Void>> closeHandler)
Closes this client.
|
static CassandraClient |
create(Vertx vertx)
Like
create(io.vertx.reactivex.core.Vertx) with default options. |
static CassandraClient |
create(Vertx vertx,
CassandraClientOptions options)
Create a Cassandra client which maintains its own driver session.
|
static CassandraClient |
createShared(Vertx vertx)
Like
createShared(io.vertx.reactivex.core.Vertx) with default options and client name. |
static CassandraClient |
createShared(Vertx vertx,
CassandraClientOptions options)
Like
createShared(io.vertx.reactivex.core.Vertx) with default client name. |
static CassandraClient |
createShared(Vertx vertx,
String clientName)
Like
createShared(io.vertx.reactivex.core.Vertx) with default options. |
static CassandraClient |
createShared(Vertx vertx,
String clientName,
CassandraClientOptions options)
Create a Cassandra client that shares its driver session with any other client having the same name.
|
boolean |
equals(Object o) |
CassandraClient |
execute(com.datastax.oss.driver.api.core.cql.Statement statement)
Execute the statement and provide a handler for consuming results.
|
CassandraClient |
execute(com.datastax.oss.driver.api.core.cql.Statement statement,
Handler<AsyncResult<ResultSet>> resultHandler)
Execute the statement and provide a handler for consuming results.
|
CassandraClient |
execute(String query)
Execute the query 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.oss.driver.api.core.cql.Statement statement)
Execute the query and provide a handler for consuming results.
|
CassandraClient |
executeWithFullFetch(com.datastax.oss.driver.api.core.cql.Statement statement,
Handler<AsyncResult<List<com.datastax.oss.driver.api.core.cql.Row>>> resultHandler)
Execute the query and provide a handler for consuming results.
|
CassandraClient |
executeWithFullFetch(String query)
Execute the query and provide a handler for consuming results.
|
CassandraClient |
executeWithFullFetch(String query,
Handler<AsyncResult<List<com.datastax.oss.driver.api.core.cql.Row>>> resultHandler)
Execute the query and provide a handler for consuming results.
|
CassandraClient |
getDelegate() |
int |
hashCode() |
boolean |
isConnected() |
void |
metadata()
Get for the session.
|
void |
metadata(Handler<AsyncResult<com.datastax.oss.driver.api.core.metadata.Metadata>> handler)
Get for the session.
|
static CassandraClient |
newInstance(CassandraClient arg) |
CassandraClient |
prepare(com.datastax.oss.driver.api.core.cql.SimpleStatement statement)
Prepares the provided a .
|
CassandraClient |
prepare(com.datastax.oss.driver.api.core.cql.SimpleStatement statement,
Handler<AsyncResult<com.datastax.oss.driver.api.core.cql.PreparedStatement>> resultHandler)
Prepares the provided a .
|
CassandraClient |
prepare(String query)
Prepares the provided query string.
|
CassandraClient |
prepare(String query,
Handler<AsyncResult<com.datastax.oss.driver.api.core.cql.PreparedStatement>> resultHandler)
Prepares the provided query string.
|
CassandraClient |
queryStream(com.datastax.oss.driver.api.core.cql.Statement statement)
Executes the given SQL statement which returns the results of the query as a read stream.
|
CassandraClient |
queryStream(com.datastax.oss.driver.api.core.cql.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)
Executes the given SQL
SELECT 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 |
rxClose()
Closes this client.
|
Single<ResultSet> |
rxExecute(com.datastax.oss.driver.api.core.cql.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.oss.driver.api.core.cql.Row>> |
rxExecuteWithFullFetch(com.datastax.oss.driver.api.core.cql.Statement statement)
Execute the query and provide a handler for consuming results.
|
Single<List<com.datastax.oss.driver.api.core.cql.Row>> |
rxExecuteWithFullFetch(String query)
Execute the query and provide a handler for consuming results.
|
Single<com.datastax.oss.driver.api.core.metadata.Metadata> |
rxMetadata()
Get for the session.
|
Single<com.datastax.oss.driver.api.core.cql.PreparedStatement> |
rxPrepare(com.datastax.oss.driver.api.core.cql.SimpleStatement statement)
Prepares the provided a .
|
Single<com.datastax.oss.driver.api.core.cql.PreparedStatement> |
rxPrepare(String query)
Prepares the provided query string.
|
Single<CassandraRowStream> |
rxQueryStream(com.datastax.oss.driver.api.core.cql.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() |
public static final io.vertx.lang.rx.TypeArg<CassandraClient> __TYPE_ARG
public static final String DEFAULT_SHARED_CLIENT_NAME
public CassandraClient(CassandraClient delegate)
public CassandraClient(Object delegate)
public CassandraClient getDelegate()
public static CassandraClient create(Vertx vertx)
create(io.vertx.reactivex.core.Vertx)
with default options.vertx
- public static CassandraClient create(Vertx vertx, CassandraClientOptions options)
It is not recommended to create several non shared clients in an application.
vertx
- the Vert.x instanceoptions
- the optionspublic static CassandraClient createShared(Vertx vertx)
createShared(io.vertx.reactivex.core.Vertx)
with default options and client name.vertx
- public static CassandraClient createShared(Vertx vertx, String clientName)
createShared(io.vertx.reactivex.core.Vertx)
with default options.vertx
- clientName
- public static CassandraClient createShared(Vertx vertx, CassandraClientOptions options)
createShared(io.vertx.reactivex.core.Vertx)
with default client name.vertx
- options
- public static CassandraClient createShared(Vertx vertx, String clientName, CassandraClientOptions options)
vertx
- the Vert.x instanceclientName
- the shared client nameoptions
- the optionspublic boolean isConnected()
public CassandraClient execute(String query, Handler<AsyncResult<ResultSet>> resultHandler)
query
- the query to executeresultHandler
- handler called when result of execution is present, but can be not fully fetchedpublic CassandraClient execute(String query)
query
- the query to executepublic Single<ResultSet> rxExecute(String query)
query
- the query to executepublic CassandraClient queryStream(String sql, Handler<AsyncResult<CassandraRowStream>> rowStreamHandler)
SELECT
statement which returns the results of the query as a read stream.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
.public CassandraClient queryStream(String sql)
SELECT
statement which returns the results of the query as a read stream.sql
- the SQL to execute. For example SELECT * FROM table ...
.public Single<CassandraRowStream> rxQueryStream(String sql)
SELECT
statement which returns the results of the query as a read stream.sql
- the SQL to execute. For example SELECT * FROM table ...
.public CassandraClient close(Handler<AsyncResult<Void>> closeHandler)
closeHandler
- handler called when client is closedpublic CassandraClient close()
public Completable rxClose()
public CassandraClient executeWithFullFetch(String query, Handler<AsyncResult<List<com.datastax.oss.driver.api.core.cql.Row>>> resultHandler)
query
- the query to executeresultHandler
- handler called when result of execution is fully fetched.public CassandraClient executeWithFullFetch(String query)
query
- the query to executepublic Single<List<com.datastax.oss.driver.api.core.cql.Row>> rxExecuteWithFullFetch(String query)
query
- the query to executepublic CassandraClient executeWithFullFetch(com.datastax.oss.driver.api.core.cql.Statement statement, Handler<AsyncResult<List<com.datastax.oss.driver.api.core.cql.Row>>> resultHandler)
statement
- the statement to executeresultHandler
- handler called when result of execution is fully fetched.public CassandraClient executeWithFullFetch(com.datastax.oss.driver.api.core.cql.Statement statement)
statement
- the statement to executepublic Single<List<com.datastax.oss.driver.api.core.cql.Row>> rxExecuteWithFullFetch(com.datastax.oss.driver.api.core.cql.Statement statement)
statement
- the statement to executepublic CassandraClient execute(com.datastax.oss.driver.api.core.cql.Statement statement, Handler<AsyncResult<ResultSet>> resultHandler)
statement
- the statement to executeresultHandler
- handler called when result of execution is presentpublic CassandraClient execute(com.datastax.oss.driver.api.core.cql.Statement statement)
statement
- the statement to executepublic Single<ResultSet> rxExecute(com.datastax.oss.driver.api.core.cql.Statement statement)
statement
- the statement to executepublic CassandraClient prepare(String query, Handler<AsyncResult<com.datastax.oss.driver.api.core.cql.PreparedStatement>> resultHandler)
query
- the query to prepareresultHandler
- handler called when result of query preparation is presentpublic CassandraClient prepare(String query)
query
- the query to preparepublic Single<com.datastax.oss.driver.api.core.cql.PreparedStatement> rxPrepare(String query)
query
- the query to preparepublic CassandraClient prepare(com.datastax.oss.driver.api.core.cql.SimpleStatement statement, Handler<AsyncResult<com.datastax.oss.driver.api.core.cql.PreparedStatement>> resultHandler)
statement
- the statement to prepareresultHandler
- handler called when result of query preparation is presentpublic CassandraClient prepare(com.datastax.oss.driver.api.core.cql.SimpleStatement statement)
statement
- the statement to preparepublic Single<com.datastax.oss.driver.api.core.cql.PreparedStatement> rxPrepare(com.datastax.oss.driver.api.core.cql.SimpleStatement statement)
statement
- the statement to preparepublic CassandraClient queryStream(com.datastax.oss.driver.api.core.cql.Statement statement, Handler<AsyncResult<CassandraRowStream>> rowStreamHandler)
statement
- the statement to execute.rowStreamHandler
- the handler which is called once the operation completes. It will return an instance of CassandraRowStream
.public CassandraClient queryStream(com.datastax.oss.driver.api.core.cql.Statement statement)
statement
- the statement to execute.public Single<CassandraRowStream> rxQueryStream(com.datastax.oss.driver.api.core.cql.Statement statement)
statement
- the statement to execute.public void metadata(Handler<AsyncResult<com.datastax.oss.driver.api.core.metadata.Metadata>> handler)
handler
- the handler called backed with the metadatapublic void metadata()
public Single<com.datastax.oss.driver.api.core.metadata.Metadata> rxMetadata()
public static CassandraClient newInstance(CassandraClient arg)
Copyright © 2023 Eclipse. All rights reserved.