Class CassandraClient
- java.lang.Object
-
- io.vertx.mutiny.cassandra.CassandraClient
-
public class CassandraClient extends Object
Eclipse Vert.x Cassandra client. NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<CassandraClient>
__TYPE_ARG
static String
DEFAULT_SHARED_CLIENT_NAME
The default shared client name.
-
Constructor Summary
Constructors Constructor Description CassandraClient(io.vertx.cassandra.CassandraClient delegate)
CassandraClient(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.smallrye.mutiny.Uni<Void>
close()
Closes this client.Void
closeAndAwait()
Blocking variant ofclose()
.CassandraClient
closeAndForget()
Variant ofclose()
that ignores the result of the operation.static CassandraClient
create(Vertx vertx)
static CassandraClient
create(Vertx vertx, io.vertx.cassandra.CassandraClientOptions options)
static CassandraClient
createShared(Vertx vertx)
static CassandraClient
createShared(Vertx vertx, io.vertx.cassandra.CassandraClientOptions options)
static CassandraClient
createShared(Vertx vertx, String clientName)
static CassandraClient
createShared(Vertx vertx, String clientName, io.vertx.cassandra.CassandraClientOptions options)
boolean
equals(Object o)
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.io.smallrye.mutiny.Uni<ResultSet>
execute(String query)
Execute the query and provide a handler for consuming results.ResultSet
executeAndAwait(com.datastax.oss.driver.api.core.cql.Statement statement)
Blocking variant ofexecute(Statement)
.ResultSet
executeAndAwait(String query)
Blocking variant ofexecute(String)
.CassandraClient
executeAndForget(com.datastax.oss.driver.api.core.cql.Statement statement)
Variant ofexecute(Statement)
that ignores the result of the operation.CassandraClient
executeAndForget(String query)
Variant ofexecute(String)
that ignores the result of the operation.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)
Blocking variant ofexecuteWithFullFetch(Statement)
.List<com.datastax.oss.driver.api.core.cql.Row>
executeWithFullFetchAndAwait(String query)
Blocking variant ofexecuteWithFullFetch(String)
.void
executeWithFullFetchAndForget(com.datastax.oss.driver.api.core.cql.Statement statement)
Variant ofexecuteWithFullFetch(Statement)
that ignores the result of the operation.void
executeWithFullFetchAndForget(String query)
Variant ofexecuteWithFullFetch(String)
that ignores the result of the operation.io.vertx.cassandra.CassandraClient
getDelegate()
int
hashCode()
boolean
isConnected()
io.smallrye.mutiny.Uni<com.datastax.oss.driver.api.core.metadata.Metadata>
metadata()
Get for the session.com.datastax.oss.driver.api.core.metadata.Metadata
metadataAndAwait()
Blocking variant ofmetadata()
.void
metadataAndForget()
Variant ofmetadata()
that ignores the result of the operation.static CassandraClient
newInstance(io.vertx.cassandra.CassandraClient arg)
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 a .io.smallrye.mutiny.Uni<com.datastax.oss.driver.api.core.cql.PreparedStatement>
prepare(String query)
Prepares the provided query string.com.datastax.oss.driver.api.core.cql.PreparedStatement
prepareAndAwait(com.datastax.oss.driver.api.core.cql.SimpleStatement statement)
Blocking variant ofprepare(SimpleStatement)
.com.datastax.oss.driver.api.core.cql.PreparedStatement
prepareAndAwait(String query)
Blocking variant ofprepare(String)
.void
prepareAndForget(com.datastax.oss.driver.api.core.cql.SimpleStatement statement)
Variant ofprepare(SimpleStatement)
that ignores the result of the operation.void
prepareAndForget(String query)
Variant ofprepare(String)
that ignores the result of the operation.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 SQLSELECT
statement which returns the results of the query as a read stream.CassandraRowStream
queryStreamAndAwait(com.datastax.oss.driver.api.core.cql.Statement statement)
Blocking variant ofqueryStream(Statement)
.CassandraRowStream
queryStreamAndAwait(String sql)
Blocking variant ofqueryStream(String)
.CassandraClient
queryStreamAndForget(com.datastax.oss.driver.api.core.cql.Statement statement)
Variant ofqueryStream(Statement)
that ignores the result of the operation.CassandraClient
queryStreamAndForget(String sql)
Variant ofqueryStream(String)
that ignores the result of the operation.String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<CassandraClient> __TYPE_ARG
-
DEFAULT_SHARED_CLIENT_NAME
public static final String DEFAULT_SHARED_CLIENT_NAME
The default shared client name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CassandraClient
public CassandraClient(io.vertx.cassandra.CassandraClient delegate)
-
CassandraClient
public CassandraClient(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.cassandra.CassandraClient getDelegate()
-
create
public static CassandraClient create(Vertx vertx)
- Parameters:
vertx
-- Returns:
-
create
public static CassandraClient create(Vertx vertx, io.vertx.cassandra.CassandraClientOptions options)
- Parameters:
vertx
- the Vert.x instanceoptions
- the options- Returns:
- the client
-
createShared
public static CassandraClient createShared(Vertx vertx)
- Parameters:
vertx
-- Returns:
-
createShared
public static CassandraClient createShared(Vertx vertx, String clientName)
- Parameters:
vertx
-clientName
-- Returns:
-
createShared
public static CassandraClient createShared(Vertx vertx, io.vertx.cassandra.CassandraClientOptions options)
- Parameters:
vertx
-options
-- Returns:
-
createShared
public static CassandraClient createShared(Vertx vertx, String clientName, io.vertx.cassandra.CassandraClientOptions options)
- Parameters:
vertx
- the Vert.x instanceclientName
- the shared client nameoptions
- the options- Returns:
- the client
-
isConnected
public boolean isConnected()
- Returns:
- whether this Cassandra client instance is connected
-
execute
@CheckReturnValue public io.smallrye.mutiny.Uni<ResultSet> execute(String query)
Execute the query and provide a handler for consuming results.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
query
- the query to execute- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
executeAndAwait
public ResultSet executeAndAwait(String query)
Blocking variant ofexecute(String)
.This method waits 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 a RuntimeException).
- Parameters:
query
- the query to execute- Returns:
- the ResultSet instance produced by the operation.
-
executeAndForget
public CassandraClient executeAndForget(String query)
Variant ofexecute(String)
that ignores the result of the operation.This method subscribes on the result of
execute(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromexecute(String)
but you don't need to compose it with other operations.- Parameters:
query
- the query to execute- Returns:
- the instance of CassandraClient to chain method calls.
-
queryStream
@CheckReturnValue public io.smallrye.mutiny.Uni<CassandraRowStream> queryStream(String sql)
Executes the given SQLSELECT
statement which returns the results of the query as a read stream.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queryStreamAndAwait
public CassandraRowStream queryStreamAndAwait(String sql)
Blocking variant ofqueryStream(String)
.This method waits 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 a RuntimeException).
- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
- the CassandraRowStream instance produced by the operation.
-
queryStreamAndForget
public CassandraClient queryStreamAndForget(String sql)
Variant ofqueryStream(String)
that ignores the result of the operation.This method subscribes on the result of
queryStream(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromqueryStream(String)
but you don't need to compose it with other operations.- Parameters:
sql
- the SQL to execute. For exampleSELECT * FROM table ...
.- Returns:
- the instance of CassandraClient to chain method calls.
-
close
@CheckReturnValue public io.smallrye.mutiny.Uni<Void> close()
Closes this client.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
closeAndAwait
public Void closeAndAwait()
Blocking variant ofclose()
.This method waits 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 a RuntimeException).
- Returns:
- the Void instance produced by the operation.
-
closeAndForget
public CassandraClient closeAndForget()
Variant ofclose()
that ignores the result of the operation.This method subscribes on the result of
close()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromclose()
but you don't need to compose it with other operations.- Returns:
- the instance of CassandraClient to chain method calls.
-
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
. Don't forget to subscribe on it to trigger the operation.- Parameters:
query
- the query to execute- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
executeWithFullFetchAndAwait
public List<com.datastax.oss.driver.api.core.cql.Row> executeWithFullFetchAndAwait(String query)
Blocking variant ofexecuteWithFullFetch(String)
.This method waits 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 a RuntimeException).
- Parameters:
query
- the query to execute- Returns:
- the List
instance produced by the operation.
-
executeWithFullFetchAndForget
public void executeWithFullFetchAndForget(String query)
Variant ofexecuteWithFullFetch(String)
that ignores the result of the operation.This method subscribes on the result of
executeWithFullFetch(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromexecuteWithFullFetch(String)
but you don't need to compose it with other operations.- Parameters:
query
- the query to execute
-
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
. Don't forget to subscribe on it to trigger the operation.- Parameters:
statement
- the statement to execute- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
executeWithFullFetchAndAwait
public List<com.datastax.oss.driver.api.core.cql.Row> executeWithFullFetchAndAwait(com.datastax.oss.driver.api.core.cql.Statement statement)
Blocking variant ofexecuteWithFullFetch(Statement)
.This method waits 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 a RuntimeException).
- Parameters:
statement
- the statement to execute- Returns:
- the List
instance produced by the operation.
-
executeWithFullFetchAndForget
public void executeWithFullFetchAndForget(com.datastax.oss.driver.api.core.cql.Statement statement)
Variant ofexecuteWithFullFetch(Statement)
that ignores the result of the operation.This method subscribes on the result of
executeWithFullFetch(Statement)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromexecuteWithFullFetch(Statement)
but you don't need to compose it with other operations.- Parameters:
statement
- the statement to execute
-
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
. Don't forget to subscribe on it to trigger the operation.- Parameters:
statement
- the statement to execute- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
executeAndAwait
public ResultSet executeAndAwait(com.datastax.oss.driver.api.core.cql.Statement statement)
Blocking variant ofexecute(Statement)
.This method waits 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 a RuntimeException).
- Parameters:
statement
- the statement to execute- Returns:
- the ResultSet instance produced by the operation.
-
executeAndForget
public CassandraClient executeAndForget(com.datastax.oss.driver.api.core.cql.Statement statement)
Variant ofexecute(Statement)
that ignores the result of the operation.This method subscribes on the result of
execute(Statement)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromexecute(Statement)
but you don't need to compose it with other operations.- Parameters:
statement
- the statement to execute- Returns:
- the instance of CassandraClient to chain method calls.
-
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
. Don't forget to subscribe on it to trigger the operation.- Parameters:
query
- the query to prepare- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
prepareAndAwait
public com.datastax.oss.driver.api.core.cql.PreparedStatement prepareAndAwait(String query)
Blocking variant ofprepare(String)
.This method waits 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 a RuntimeException).
- Parameters:
query
- the query to prepare- Returns:
- the PreparedStatement instance produced by the operation.
-
prepareAndForget
public void prepareAndForget(String query)
Variant ofprepare(String)
that ignores the result of the operation.This method subscribes on the result of
prepare(String)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromprepare(String)
but you don't need to compose it with other operations.- Parameters:
query
- the query to prepare
-
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 a .Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Parameters:
statement
- the statement to prepare- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
prepareAndAwait
public com.datastax.oss.driver.api.core.cql.PreparedStatement prepareAndAwait(com.datastax.oss.driver.api.core.cql.SimpleStatement statement)
Blocking variant ofprepare(SimpleStatement)
.This method waits 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 a RuntimeException).
- Parameters:
statement
- the statement to prepare- Returns:
- the PreparedStatement instance produced by the operation.
-
prepareAndForget
public void prepareAndForget(com.datastax.oss.driver.api.core.cql.SimpleStatement statement)
Variant ofprepare(SimpleStatement)
that ignores the result of the operation.This method subscribes on the result of
prepare(SimpleStatement)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromprepare(SimpleStatement)
but you don't need to compose it with other operations.- Parameters:
statement
- the statement to prepare
-
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
. Don't forget to subscribe on it to trigger the operation.- Parameters:
statement
- the statement to execute.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
queryStreamAndAwait
public CassandraRowStream queryStreamAndAwait(com.datastax.oss.driver.api.core.cql.Statement statement)
Blocking variant ofqueryStream(Statement)
.This method waits 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 a RuntimeException).
- Parameters:
statement
- the statement to execute.- Returns:
- the CassandraRowStream instance produced by the operation.
-
queryStreamAndForget
public CassandraClient queryStreamAndForget(com.datastax.oss.driver.api.core.cql.Statement statement)
Variant ofqueryStream(Statement)
that ignores the result of the operation.This method subscribes on the result of
queryStream(Statement)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromqueryStream(Statement)
but you don't need to compose it with other operations.- Parameters:
statement
- the statement to execute.- Returns:
- the instance of CassandraClient to chain method calls.
-
metadata
@CheckReturnValue public io.smallrye.mutiny.Uni<com.datastax.oss.driver.api.core.metadata.Metadata> metadata()
Get for the session.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
metadataAndAwait
public com.datastax.oss.driver.api.core.metadata.Metadata metadataAndAwait()
Blocking variant ofmetadata()
.This method waits 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 a RuntimeException).
- Returns:
- the Metadata instance produced by the operation.
-
metadataAndForget
public void metadataAndForget()
Variant ofmetadata()
that ignores the result of the operation.This method subscribes on the result of
metadata()
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation frommetadata()
but you don't need to compose it with other operations.
-
newInstance
public static CassandraClient newInstance(io.vertx.cassandra.CassandraClient arg)
-
-