Interface ReactiveSession
-
- All Superinterfaces:
AsyncAutoCloseable,AutoCloseable,Session
- All Known Subinterfaces:
CqlSession,DseSession
public interface ReactiveSession extends Session
ASessionthat offers utility methods to issue queries using reactive-style programming.Methods in this interface all return
ReactiveResultSetinstances. See the javadocs of this interface for important remarks anc caveats regarding the subscription to and consumption of reactive result sets.- See Also:
ReactiveResultSet,ReactiveRow
-
-
Field Summary
-
Fields inherited from interface com.datastax.oss.driver.api.core.session.Session
OSS_DRIVER_COORDINATES
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default ReactiveResultSetexecuteReactive(Statement<?> statement)Returns aPublisherthat, once subscribed to, executes the given query and emits all the results.default ReactiveResultSetexecuteReactive(String query)Returns aPublisherthat, once subscribed to, executes the given query and emits all the results.default ReactiveResultSetexecuteReactive(String query, Object... values)Returns aPublisherthat, once subscribed to, executes the given query and emits all the results.default ReactiveResultSetexecuteReactive(String query, Map<String,Object> values)Returns aPublisherthat, once subscribed to, executes the given query and emits all the results.-
Methods inherited from interface com.datastax.oss.driver.api.core.AsyncAutoCloseable
close, closeAsync, closeFuture, forceCloseAsync, isClosed
-
Methods inherited from interface com.datastax.oss.driver.api.core.session.Session
checkSchemaAgreement, checkSchemaAgreementAsync, execute, getContext, getKeyspace, getMetadata, getMetrics, getName, isSchemaMetadataEnabled, refreshSchema, refreshSchemaAsync, setSchemaMetadataEnabled
-
-
-
-
Method Detail
-
executeReactive
@NonNull default ReactiveResultSet executeReactive(@NonNull String query)
Returns aPublisherthat, once subscribed to, executes the given query and emits all the results.This is an alias for
executeReactive(Statement)executeReactive(SimpleStatement.newInstance(query))}.- Parameters:
query- the query to execute.- Returns:
- The
Publisherthat will publish the returned results. - See Also:
SimpleStatement.newInstance(String)
-
executeReactive
@NonNull default ReactiveResultSet executeReactive(@NonNull String query, @NonNull Object... values)
Returns aPublisherthat, once subscribed to, executes the given query and emits all the results.This is an alias for
executeReactive(Statement)executeReactive(SimpleStatement.newInstance(query, values))}.- Parameters:
query- the query to execute.values- the values for placeholders in the query string. Individual values can benull, but the vararg array itself can't.- Returns:
- The
Publisherthat will publish the returned results. - See Also:
SimpleStatement.newInstance(String,Object...)
-
executeReactive
@NonNull default ReactiveResultSet executeReactive(@NonNull String query, @NonNull Map<String,Object> values)
Returns aPublisherthat, once subscribed to, executes the given query and emits all the results.This is an alias for
executeReactive(Statement)executeReactive(SimpleStatement.newInstance(query,values))}.- Parameters:
query- the query to execute.values- the values for named placeholders in the query string. Individual values can benull, but the map itself can't.- Returns:
- The
Publisherthat will publish the returned results. - See Also:
SimpleStatement.newInstance(String,Map)
-
executeReactive
@NonNull default ReactiveResultSet executeReactive(@NonNull Statement<?> statement)
Returns aPublisherthat, once subscribed to, executes the given query and emits all the results.- Parameters:
statement- the statement to execute.- Returns:
- The
Publisherthat will publish the returned results.
-
-