public interface ReactiveSession extends Session
Session
that offers utility methods to issue queries using reactive-style programming.
Methods in this interface all return ReactiveResultSet
instances. See the javadocs of
this interface for important remarks anc caveats regarding the subscription to and consumption of
reactive result sets.
ReactiveResultSet
,
ReactiveRow
OSS_DRIVER_COORDINATES
Modifier and Type | Method and Description |
---|---|
default ReactiveResultSet |
executeReactive(Statement<?> statement)
Returns a
Publisher that, once subscribed to, executes the given query and emits all
the results. |
default ReactiveResultSet |
executeReactive(String query)
Returns a
Publisher that, once subscribed to, executes the given query and emits all
the results. |
default ReactiveResultSet |
executeReactive(String query,
Map<String,Object> values)
Returns a
Publisher that, once subscribed to, executes the given query and emits all
the results. |
default ReactiveResultSet |
executeReactive(String query,
Object... values)
Returns a
Publisher that, once subscribed to, executes the given query and emits all
the results. |
checkSchemaAgreement, checkSchemaAgreementAsync, execute, getContext, getKeyspace, getMetadata, getMetrics, getName, isSchemaMetadataEnabled, refreshSchema, refreshSchemaAsync, setSchemaMetadataEnabled
close, closeAsync, closeFuture, forceCloseAsync, isClosed
@NonNull default ReactiveResultSet executeReactive(@NonNull String query)
Publisher
that, once subscribed to, executes the given query and emits all
the results.
This is an alias for executeReactive(Statement)
executeReactive(SimpleStatement.newInstance(query))}.
query
- the query to execute.Publisher
that will publish the returned results.SimpleStatement.newInstance(String)
@NonNull default ReactiveResultSet executeReactive(@NonNull String query, @NonNull Object... values)
Publisher
that, once subscribed to, executes the given query and emits all
the results.
This is an alias for executeReactive(Statement)
executeReactive(SimpleStatement.newInstance(query, values))}.
query
- the query to execute.values
- the values for placeholders in the query string. Individual values can be null
, but the vararg array itself can't.Publisher
that will publish the returned results.SimpleStatement.newInstance(String,Object...)
@NonNull default ReactiveResultSet executeReactive(@NonNull String query, @NonNull Map<String,Object> values)
Publisher
that, once subscribed to, executes the given query and emits all
the results.
This is an alias for executeReactive(Statement)
executeReactive(SimpleStatement.newInstance(query,values))}.
query
- the query to execute.values
- the values for named placeholders in the query string. Individual values can be
null
, but the map itself can't.Publisher
that will publish the returned results.SimpleStatement.newInstance(String,Map)
@NonNull default ReactiveResultSet executeReactive(@NonNull Statement<?> statement)
Publisher
that, once subscribed to, executes the given query and emits all
the results.statement
- the statement to execute.Publisher
that will publish the returned results.Copyright © 2017–2024. All rights reserved.