Class CassandraClient
java.lang.Object
io.vertx.rxjava3.cassandra.CassandraClient
- All Implemented Interfaces:
io.vertx.lang.rx.RxDelegate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final io.vertx.lang.rx.TypeArg<CassandraClient> static final StringThe default shared client name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclose()Closes this client.static CassandraClientLikecreate(Vertx)with default options.static CassandraClientcreate(Vertx vertx, CassandraClientOptions options) Create a Cassandra client which maintains its own driver session.static CassandraClientcreateShared(Vertx vertx) LikecreateShared(Vertx)with default options and client name.static CassandraClientcreateShared(Vertx vertx, CassandraClientOptions options) LikecreateShared(Vertx)with default client name.static CassandraClientcreateShared(Vertx vertx, String clientName) LikecreateShared(Vertx)with default options.static CassandraClientcreateShared(Vertx vertx, String clientName, CassandraClientOptions options) Create a Cassandra client that shares its driver session with any other client having the same name.booleanexecute(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the statement and provide a handler for consuming results.Execute the query and provide a handler for consuming results.executeWithFullFetch(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the query and provide a handler for consuming results.executeWithFullFetch(String query) Execute the query and provide a handler for consuming results.inthashCode()booleanSingle<com.datastax.oss.driver.api.core.metadata.Metadata> metadata()Get for the session.static CassandraClientSingle<com.datastax.oss.driver.api.core.cql.PreparedStatement> prepare(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) Prepares the provided a .Single<com.datastax.oss.driver.api.core.cql.PreparedStatement> Prepares the provided query string.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.queryStream(String sql) Executes the given SQLSELECTstatement which returns the results of the query as a read stream.rxClose()Closes this client.rxExecute(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the statement and provide a handler for consuming results.Execute the query and provide a handler for consuming results.rxExecuteWithFullFetch(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the query and provide a handler for consuming results.rxExecuteWithFullFetch(String query) Execute the query and provide a handler for consuming results.Single<com.datastax.oss.driver.api.core.metadata.Metadata> 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> Prepares the provided query string.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.rxQueryStream(String sql) Executes the given SQLSELECTstatement which returns the results of the query as a read stream.toString()
-
Field Details
-
__TYPE_ARG
-
DEFAULT_SHARED_CLIENT_NAME
-
-
Constructor Details
-
CassandraClient
-
CassandraClient
-
-
Method Details
-
toString
-
equals
-
hashCode
-
getDelegate
- Specified by:
getDelegatein interfaceio.vertx.lang.rx.RxDelegate
-
create
Likecreate(Vertx)with default options.- Parameters:
vertx-- Returns:
-
create
Create a Cassandra client which maintains its own driver session.It is not recommended to create several non shared clients in an application.
- Parameters:
vertx- the Vert.x instanceoptions- the options- Returns:
- the client
-
isConnected
public boolean isConnected()- Returns:
- whether this Cassandra client instance is connected
-
execute
-
rxExecute
-
queryStream
Executes the given SQLSELECTstatement which returns the results of the query as a read stream.- Parameters:
sql- the SQL to execute. For exampleSELECT * FROM table ....- Returns:
- a future of the result
-
rxQueryStream
Executes the given SQLSELECTstatement which returns the results of the query as a read stream.- Parameters:
sql- the SQL to execute. For exampleSELECT * FROM table ....- Returns:
- a future of the result
-
close
-
rxClose
-
executeWithFullFetch
-
rxExecuteWithFullFetch
-
executeWithFullFetch
-
rxExecuteWithFullFetch
-
execute
-
rxExecute
-
prepare
-
rxPrepare
-
prepare
public Single<com.datastax.oss.driver.api.core.cql.PreparedStatement> prepare(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) Prepares the provided a .- Parameters:
statement- the statement to prepare- Returns:
- a future of the result
-
rxPrepare
public Single<com.datastax.oss.driver.api.core.cql.PreparedStatement> rxPrepare(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) Prepares the provided a .- Parameters:
statement- the statement to prepare- Returns:
- a future of the result
-
queryStream
public Single<CassandraRowStream> 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.- Parameters:
statement- the statement to execute.- Returns:
- a future of the result
-
rxQueryStream
public 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.- Parameters:
statement- the statement to execute.- Returns:
- a future of the result
-
metadata
Get for the session.- Returns:
- a future of the result
-
rxMetadata
Get for the session.- Returns:
- a future of the result
-
newInstance
-