public interface AsyncCqlSession extends Session
OSS_DRIVER_COORDINATES
Modifier and Type | Method and Description |
---|---|
default CompletionStage<AsyncResultSet> |
executeAsync(Statement<?> statement)
Executes a CQL statement asynchronously (the call returns as soon as the statement was sent,
generally before the result is available).
|
default CompletionStage<AsyncResultSet> |
executeAsync(String query)
Executes a CQL statement asynchronously (the call returns as soon as the statement was sent,
generally before the result is available).
|
default CompletionStage<AsyncResultSet> |
executeAsync(String query,
Map<String,Object> values)
Executes a CQL statement asynchronously (the call returns as soon as the statement was sent,
generally before the result is available).
|
default CompletionStage<AsyncResultSet> |
executeAsync(String query,
Object... values)
Executes a CQL statement asynchronously (the call returns as soon as the statement was sent,
generally before the result is available).
|
default CompletionStage<PreparedStatement> |
prepareAsync(PrepareRequest request)
Prepares a CQL statement asynchronously (the call returns as soon as the prepare query was
sent, generally before the statement is prepared).
|
default CompletionStage<PreparedStatement> |
prepareAsync(SimpleStatement statement)
Prepares a CQL statement asynchronously (the call returns as soon as the prepare query was
sent, generally before the statement is prepared).
|
default CompletionStage<PreparedStatement> |
prepareAsync(String query)
Prepares a CQL statement asynchronously (the call returns as soon as the prepare query was
sent, generally before the statement is prepared).
|
checkSchemaAgreement, checkSchemaAgreementAsync, execute, getContext, getKeyspace, getMetadata, getMetrics, getName, isSchemaMetadataEnabled, refreshSchema, refreshSchemaAsync, setSchemaMetadataEnabled
close, closeAsync, closeFuture, forceCloseAsync, isClosed
@NonNull default CompletionStage<AsyncResultSet> executeAsync(@NonNull Statement<?> statement)
statement
- the CQL query to execute (that can be any Statement
).CompletionStage
that, once complete, will produce the async result set.@NonNull default CompletionStage<AsyncResultSet> executeAsync(@NonNull String query)
This is an alias for executeAsync(Statement)
executeAsync(SimpleStatement.newInstance(query))}.
query
- the CQL query to execute.CompletionStage
that, once complete, will produce the async result set.SimpleStatement.newInstance(String)
@NonNull default CompletionStage<AsyncResultSet> executeAsync(@NonNull String query, @NonNull Object... values)
This is an alias for executeAsync(Statement)
executeAsync(SimpleStatement.newInstance(query, values))}.
query
- the CQL query to execute.values
- the values for placeholders in the query string. Individual values can be null
, but the vararg array itself can't.CompletionStage
that, once complete, will produce the async result set.SimpleStatement.newInstance(String, Object...)
@NonNull default CompletionStage<AsyncResultSet> executeAsync(@NonNull String query, @NonNull Map<String,Object> values)
This is an alias for executeAsync(Statement)
executeAsync(SimpleStatement.newInstance(query, values))}.
query
- the CQL query to execute.values
- the values for named placeholders in the query string. Individual values can be
null
, but the map itself can't.CompletionStage
that, once complete, will produce the async result set.SimpleStatement.newInstance(String, Map)
@NonNull default CompletionStage<PreparedStatement> prepareAsync(@NonNull SimpleStatement statement)
Note that the bound statements created from the resulting prepared statement will inherit
some of the attributes of query
; see SyncCqlSession.prepare(SimpleStatement)
for more details.
The result of this method is cached (see SyncCqlSession.prepare(SimpleStatement)
for
more explanations).
statement
- the CQL query to prepare (that can be any SimpleStatement
).CompletionStage
that, once complete, will produce the prepared statement.@NonNull default CompletionStage<PreparedStatement> prepareAsync(@NonNull String query)
The result of this method is cached (see SyncCqlSession.prepare(SimpleStatement)
for
more explanations).
query
- the CQL query string to prepare.CompletionStage
that, once complete, will produce the prepared statement.@NonNull default CompletionStage<PreparedStatement> prepareAsync(PrepareRequest request)
This variant is exposed in case you use an ad hoc PrepareRequest
implementation to
customize how attributes are propagated when you prepare a SimpleStatement
(see SyncCqlSession.prepare(SimpleStatement)
for more explanations). Otherwise, you should rarely
have to deal with PrepareRequest
directly.
The result of this method is cached (see SyncCqlSession.prepare(SimpleStatement)
for
more explanations).
request
- the PrepareRequest
to prepare.CompletionStage
that, once complete, will produce the prepared statement.Copyright © 2017–2024. All rights reserved.