Class CassandraClient
- All Implemented Interfaces:
MutinyDelegate
NOTE: This class has been automatically generated from the original non Mutiny-ified interface.
- Author:
- Pavel Drankou, Thomas Segismont
- See Also:
-
CassandraClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final TypeArg<CassandraClient>static final StringThe default shared client name. -
Constructor Summary
ConstructorsConstructorDescriptionCassandraClient(io.vertx.cassandra.CassandraClient delegate) Create a new instance ofCassandraClientdelegating to the given (non-null) instance ofCassandraClient.CassandraClient(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionio.smallrye.mutiny.Uni<Void>close()Closes this client.voidCloses this client.Closes this client.static CassandraClientLikecreate(Vertx, CassandraClientOptions)with default options.static CassandraClientCreate 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, io.vertx.cassandra.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, io.vertx.cassandra.CassandraClientOptions options) Create a Cassandra client that shares its driver session with any other client having the same name.booleanio.smallrye.mutiny.Uni<ResultSet>execute(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the statement and provide a handler for consuming results.io.smallrye.mutiny.Uni<ResultSet>Execute the query and provide a handler for consuming results.executeAndAwait(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the statement and provide a handler for consuming results.executeAndAwait(String query) Execute the query and provide a handler for consuming results.executeAndForget(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the statement and provide a handler for consuming results.executeAndForget(String query) Execute the query and provide a handler for consuming results.io.smallrye.mutiny.Uni<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.io.smallrye.mutiny.Uni<List<com.datastax.oss.driver.api.core.cql.Row>>executeWithFullFetch(String query) Execute the query and provide a handler for consuming results.List<com.datastax.oss.driver.api.core.cql.Row>executeWithFullFetchAndAwait(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the query and provide a handler for consuming results.List<com.datastax.oss.driver.api.core.cql.Row>Execute the query and provide a handler for consuming results.executeWithFullFetchAndForget(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the query and provide a handler for consuming results.Execute the query and provide a handler for consuming results.io.vertx.cassandra.CassandraClientGet the delegate instance.inthashCode()booleanio.smallrye.mutiny.Uni<com.datastax.oss.driver.api.core.metadata.Metadata>metadata()GetMetadatafor the session.com.datastax.oss.driver.api.core.metadata.MetadataGetMetadatafor the session.GetMetadatafor the session.static CassandraClientnewInstance(io.vertx.cassandra.CassandraClient delegate) Creates a new instance of theCassandraClient.io.smallrye.mutiny.Uni<com.datastax.oss.driver.api.core.cql.PreparedStatement>prepare(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) Prepares the provided aSimpleStatement.io.smallrye.mutiny.Uni<com.datastax.oss.driver.api.core.cql.PreparedStatement>Prepares the provided query string.com.datastax.oss.driver.api.core.cql.PreparedStatementprepareAndAwait(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) Prepares the provided aSimpleStatement.com.datastax.oss.driver.api.core.cql.PreparedStatementprepareAndAwait(String query) Prepares the provided query string.prepareAndForget(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) Prepares the provided aSimpleStatement.prepareAndForget(String query) Prepares the provided query string.io.smallrye.mutiny.Uni<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.io.smallrye.mutiny.Uni<CassandraRowStream>queryStream(String sql) Executes the given SQLSELECTstatement which returns the results of the query as a read stream.queryStreamAndAwait(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.Executes the given SQLSELECTstatement which returns the results of the query as a read stream.queryStreamAndForget(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.Executes the given SQLSELECTstatement which returns the results of the query as a read stream.toString()
-
Field Details
-
DEFAULT_SHARED_CLIENT_NAME
The default shared client name.- See Also:
-
__TYPE_ARG
-
-
Constructor Details
-
CassandraClient
public CassandraClient(io.vertx.cassandra.CassandraClient delegate) Create a new instance ofCassandraClientdelegating to the given (non-null) instance ofCassandraClient. -
CassandraClient
-
-
Method Details
-
getDelegate
public io.vertx.cassandra.CassandraClient 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:
getDelegatein interfaceMutinyDelegate- Returns:
- the delegate instance
-
executeWithFullFetch
@CheckReturnValue public io.smallrye.mutiny.Uni<List<com.datastax.oss.driver.api.core.cql.Row>> executeWithFullFetch(String query) Execute the query and provide a handler for consuming results.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.
- Parameters:
query- the query to execute- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
CassandraClient.executeWithFullFetch(String)
-
executeWithFullFetchAndAwait
Execute the query and provide a handler for consuming results.Unlike the bare Vert.x variant, this method returns a
List<com.datastax.oss.driver.api.core.cql.Row>. 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 aRuntimeException).- Parameters:
query- the query to execute- Returns:
- The operation result
- See Also:
-
CassandraClient.executeWithFullFetch(String)
-
executeWithFullFetchAndForget
Execute the query and provide a handler for consuming results.Unlike the bare Vert.x variant, this method ignores the
List<com.datastax.oss.driver.api.core.cql.Row>result or any failure.- Parameters:
query- the query to execute- Returns:
- The current instance to chain operations if needed.
- See Also:
-
CassandraClient.executeWithFullFetch(String)
-
executeWithFullFetch
@CheckReturnValue public io.smallrye.mutiny.Uni<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.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.
- Parameters:
statement- the statement to execute- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
CassandraClient.executeWithFullFetch(Statement)
-
executeWithFullFetchAndAwait
public List<com.datastax.oss.driver.api.core.cql.Row> executeWithFullFetchAndAwait(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the query and provide a handler for consuming results.Unlike the bare Vert.x variant, this method returns a
List<com.datastax.oss.driver.api.core.cql.Row>. 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 aRuntimeException).- Parameters:
statement- the statement to execute- Returns:
- The operation result
- See Also:
-
CassandraClient.executeWithFullFetch(Statement)
-
executeWithFullFetchAndForget
public CassandraClient executeWithFullFetchAndForget(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the query and provide a handler for consuming results.Unlike the bare Vert.x variant, this method ignores the
List<com.datastax.oss.driver.api.core.cql.Row>result or any failure.- Parameters:
statement- the statement to execute- Returns:
- The current instance to chain operations if needed.
- See Also:
-
CassandraClient.executeWithFullFetch(Statement)
-
execute
Execute the query and provide a handler for consuming results.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.
- Parameters:
query- the query to execute- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
CassandraClient.execute(String)
-
executeAndAwait
Execute the query and provide a handler for consuming results.Unlike the bare Vert.x variant, this method returns a
ResultSet. 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 aRuntimeException).- Parameters:
query- the query to execute- Returns:
- The operation result
- See Also:
-
CassandraClient.execute(String)
-
executeAndForget
Execute the query and provide a handler for consuming results.Unlike the bare Vert.x variant, this method ignores the
ResultSetresult or any failure.- Parameters:
query- the query to execute- Returns:
- The current instance to chain operations if needed.
- See Also:
-
CassandraClient.execute(String)
-
execute
@CheckReturnValue public io.smallrye.mutiny.Uni<ResultSet> execute(com.datastax.oss.driver.api.core.cql.Statement statement) Execute the statement and provide a handler for consuming results.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.
- Parameters:
statement- the statement to execute- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
CassandraClient.execute(Statement)
-
executeAndAwait
Execute the statement and provide a handler for consuming results.Unlike the bare Vert.x variant, this method returns a
ResultSet. 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 aRuntimeException).- Parameters:
statement- the statement to execute- Returns:
- The operation result
- See Also:
-
CassandraClient.execute(Statement)
-
executeAndForget
Execute the statement and provide a handler for consuming results.Unlike the bare Vert.x variant, this method ignores the
ResultSetresult or any failure.- Parameters:
statement- the statement to execute- Returns:
- The current instance to chain operations if needed.
- See Also:
-
CassandraClient.execute(Statement)
-
prepare
@CheckReturnValue public io.smallrye.mutiny.Uni<com.datastax.oss.driver.api.core.cql.PreparedStatement> prepare(String query) Prepares the provided query string.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.
- Parameters:
query- the query to prepare- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
CassandraClient.prepare(String)
-
prepareAndAwait
Prepares the provided query string.Unlike the bare Vert.x variant, this method returns a
PreparedStatement. 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 aRuntimeException).- Parameters:
query- the query to prepare- Returns:
- The operation result
- See Also:
-
CassandraClient.prepare(String)
-
prepareAndForget
Prepares the provided query string.Unlike the bare Vert.x variant, this method ignores the
PreparedStatementresult or any failure.- Parameters:
query- the query to prepare- Returns:
- The current instance to chain operations if needed.
- See Also:
-
CassandraClient.prepare(String)
-
prepare
@CheckReturnValue public io.smallrye.mutiny.Uni<com.datastax.oss.driver.api.core.cql.PreparedStatement> prepare(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) Prepares the provided aSimpleStatement.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.
- Parameters:
statement- the statement to prepare- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
CassandraClient.prepare(SimpleStatement)
-
prepareAndAwait
public com.datastax.oss.driver.api.core.cql.PreparedStatement prepareAndAwait(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) Prepares the provided aSimpleStatement.Unlike the bare Vert.x variant, this method returns a
PreparedStatement. 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 aRuntimeException).- Parameters:
statement- the statement to prepare- Returns:
- The operation result
- See Also:
-
CassandraClient.prepare(SimpleStatement)
-
prepareAndForget
public CassandraClient prepareAndForget(com.datastax.oss.driver.api.core.cql.SimpleStatement statement) Prepares the provided aSimpleStatement.Unlike the bare Vert.x variant, this method ignores the
PreparedStatementresult or any failure.- Parameters:
statement- the statement to prepare- Returns:
- The current instance to chain operations if needed.
- See Also:
-
CassandraClient.prepare(SimpleStatement)
-
queryStream
Executes the given SQLSELECTstatement which returns the results of the query as a read stream.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.
- Parameters:
sql- the SQL to execute. For exampleSELECT * FROM table ....- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
CassandraClient.queryStream(String)
-
queryStreamAndAwait
Executes the given SQLSELECTstatement which returns the results of the query as a read stream.Unlike the bare Vert.x variant, this method returns a
CassandraRowStream. 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 aRuntimeException).- Parameters:
sql- the SQL to execute. For exampleSELECT * FROM table ....- Returns:
- The operation result
- See Also:
-
CassandraClient.queryStream(String)
-
queryStreamAndForget
Executes the given SQLSELECTstatement which returns the results of the query as a read stream.Unlike the bare Vert.x variant, this method ignores the
CassandraRowStreamresult or any failure.- Parameters:
sql- the SQL to execute. For exampleSELECT * FROM table ....- Returns:
- The current instance to chain operations if needed.
- See Also:
-
CassandraClient.queryStream(String)
-
queryStream
@CheckReturnValue public io.smallrye.mutiny.Uni<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.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.
- Parameters:
statement- the statement to execute.- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
CassandraClient.queryStream(Statement)
-
queryStreamAndAwait
public CassandraRowStream queryStreamAndAwait(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.Unlike the bare Vert.x variant, this method returns a
CassandraRowStream. 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 aRuntimeException).- Parameters:
statement- the statement to execute.- Returns:
- The operation result
- See Also:
-
CassandraClient.queryStream(Statement)
-
queryStreamAndForget
public CassandraClient queryStreamAndForget(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.Unlike the bare Vert.x variant, this method ignores the
CassandraRowStreamresult or any failure.- Parameters:
statement- the statement to execute.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
CassandraClient.queryStream(Statement)
-
close
Closes this client.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.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
CassandraClient.close()
-
closeAndAwait
public void closeAndAwait()Closes this client.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 aRuntimeException).- See Also:
-
CassandraClient.close()
-
closeAndForget
Closes this client.Unlike the bare Vert.x variant, this method ignores the
Voidresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
CassandraClient.close()
-
metadata
@CheckReturnValue public io.smallrye.mutiny.Uni<com.datastax.oss.driver.api.core.metadata.Metadata> metadata()GetMetadatafor the session.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.
- Returns:
- A
Unirepresenting the asynchronous result of this operation. - See Also:
-
CassandraClient.metadata()
-
metadataAndAwait
public com.datastax.oss.driver.api.core.metadata.Metadata metadataAndAwait()GetMetadatafor the session.Unlike the bare Vert.x variant, this method returns a
Metadata. 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 aRuntimeException).- Returns:
- The operation result
- See Also:
-
CassandraClient.metadata()
-
metadataAndForget
GetMetadatafor the session.Unlike the bare Vert.x variant, this method ignores the
Metadataresult or any failure.- Returns:
- The current instance to chain operations if needed.
- See Also:
-
CassandraClient.metadata()
-
create
Likecreate(Vertx, CassandraClientOptions)with default options. -
create
public static CassandraClient create(Vertx vertx, io.vertx.cassandra.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 instanceoptions- the options- Returns:
- the client
-
isConnected
public boolean isConnected()- Returns:
- whether this Cassandra client instance is connected
-
newInstance
Creates a new instance of theCassandraClient. -
hashCode
public int hashCode() -
equals
-
toString
-