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<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)
query
- the CQL query to execute.CompletionStage
that, once complete, will produce the async result set.@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–2020. All rights reserved.