Package io.vertx.cassandra
Interface CassandraClient
- 
 public interface CassandraClientEclipse Vert.x Cassandra client.- Author:
- Pavel Drankou, Thomas Segismont
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringDEFAULT_SHARED_CLIENT_NAMEThe default shared client name.
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Future<Void>close()Closes this client.static CassandraClientcreate(Vertx vertx)Likecreate(Vertx, CassandraClientOptions)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, String, CassandraClientOptions)with default options and client name.static CassandraClientcreateShared(Vertx vertx, CassandraClientOptions options)LikecreateShared(Vertx, String, CassandraClientOptions)with default client name.static CassandraClientcreateShared(Vertx vertx, String clientName)LikecreateShared(Vertx, String, CassandraClientOptions)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.Future<ResultSet>execute(com.datastax.oss.driver.api.core.cql.Statement statement)Execute the statement and provide a handler for consuming results.<R> Future<R>execute(com.datastax.oss.driver.api.core.cql.Statement statement, Collector<com.datastax.oss.driver.api.core.cql.Row,?,R> collector)Execute a statement and produce a result by applying a collector to result set rows.Future<ResultSet>execute(String query)Execute the query and provide a handler for consuming results.<R> Future<R>execute(String query, Collector<com.datastax.oss.driver.api.core.cql.Row,?,R> collector)Execute a query and produce a result by applying a collector to result set rows.Future<List<com.datastax.oss.driver.api.core.cql.Row>>executeWithFullFetch(com.datastax.oss.driver.api.core.cql.Statement statement)Execute the query and provide a handler for consuming results.Future<List<com.datastax.oss.driver.api.core.cql.Row>>executeWithFullFetch(String query)Execute the query and provide a handler for consuming results.booleanisConnected()Future<com.datastax.oss.driver.api.core.metadata.Metadata>metadata()GetMetadatafor the session.Future<com.datastax.oss.driver.api.core.cql.PreparedStatement>prepare(com.datastax.oss.driver.api.core.cql.SimpleStatement statement)Prepares the provided aSimpleStatement.Future<com.datastax.oss.driver.api.core.cql.PreparedStatement>prepare(String query)Prepares the provided query string.Future<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.Future<CassandraRowStream>queryStream(String sql)Executes the given SQLSELECTstatement which returns the results of the query as a read stream.
 
- 
- 
- 
Field Detail- 
DEFAULT_SHARED_CLIENT_NAMEstatic final String DEFAULT_SHARED_CLIENT_NAME The default shared client name.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
createstatic CassandraClient create(Vertx vertx) Likecreate(Vertx, CassandraClientOptions)with default options.
 - 
createstatic CassandraClient create(Vertx vertx, CassandraClientOptions options) 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 instance
- options- the options
- Returns:
- the client
 
 - 
createSharedstatic CassandraClient createShared(Vertx vertx) LikecreateShared(Vertx, String, CassandraClientOptions)with default options and client name.
 - 
createSharedstatic CassandraClient createShared(Vertx vertx, String clientName) LikecreateShared(Vertx, String, CassandraClientOptions)with default options.
 - 
createSharedstatic CassandraClient createShared(Vertx vertx, CassandraClientOptions options) LikecreateShared(Vertx, String, CassandraClientOptions)with default client name.
 - 
createSharedstatic 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.- Parameters:
- vertx- the Vert.x instance
- options- the options
- clientName- the shared client name
- Returns:
- the client
 
 - 
isConnectedboolean isConnected() - Returns:
- whether this Cassandra client instance is connected
 
 - 
executeWithFullFetchFuture<List<com.datastax.oss.driver.api.core.cql.Row>> executeWithFullFetch(String query) Execute the query and provide a handler for consuming results.- Parameters:
- query- the query to execute
- Returns:
- a future of the result
 
 - 
executeWithFullFetchFuture<List<com.datastax.oss.driver.api.core.cql.Row>> executeWithFullFetch(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the query and provide a handler for consuming results.- Parameters:
- statement- the statement to execute
- Returns:
- a future of the result
 
 - 
executeFuture<ResultSet> execute(String query) Execute the query and provide a handler for consuming results.- Parameters:
- query- the query to execute
- Returns:
- a future of the result
 
 - 
execute<R> Future<R> execute(String query, Collector<com.datastax.oss.driver.api.core.cql.Row,?,R> collector) Execute a query and produce a result by applying a collector to result set rows.- Type Parameters:
- R- the result type
- Parameters:
- query- the query to execute
- collector- the collector to use to produce a result
- Returns:
- a future of the result
 
 - 
executeFuture<ResultSet> execute(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the statement and provide a handler for consuming results.- Parameters:
- statement- the statement to execute
- Returns:
- a future of the result
 
 - 
execute<R> Future<R> execute(com.datastax.oss.driver.api.core.cql.Statement statement, Collector<com.datastax.oss.driver.api.core.cql.Row,?,R> collector) Execute a statement and produce a result by applying a collector to result set rows.- Type Parameters:
- R- the result type
- Parameters:
- statement- the statement to execute
- collector- the collector to use to produce a result
- Returns:
- a future of the result
 
 - 
prepareFuture<com.datastax.oss.driver.api.core.cql.PreparedStatement> prepare(String query) Prepares the provided query string.- Parameters:
- query- the query to prepare
- Returns:
- a future of the result
 
 - 
prepareFuture<com.datastax.oss.driver.api.core.cql.PreparedStatement> prepare(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) Prepares the provided aSimpleStatement.- Parameters:
- statement- the statement to prepare
- Returns:
- a future of the result
 
 - 
queryStreamFuture<CassandraRowStream> queryStream(String sql) Executes the given SQLSELECTstatement which returns the results of the query as a read stream.- Parameters:
- sql- the SQL to execute. For example- SELECT * FROM table ....
- Returns:
- a future of the result
 
 - 
queryStreamFuture<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
 
 - 
metadataFuture<com.datastax.oss.driver.api.core.metadata.Metadata> metadata() GetMetadatafor the session.- Returns:
- a future of the result
 
 
- 
 
-