public interface ReactiveSession
extends com.datastax.oss.driver.api.core.session.Session
Session
that offers utility methods to issue queries using reactive-style programming.
Methods in this interface all return ReactiveResultSet
instances. All publishers
support multiple subscriptions in a unicast fashion: each subscriber triggers an independent
request execution and gets its own copy of the results.
Also, note that the publishers may emit items to their subscribers on an internal driver IO
thread. Subscriber implementors are encouraged to abide by Reactive Streams
Specification rule 2.2 and avoid performing heavy computations or blocking calls inside
onNext
calls, as doing so could slow down
the driver and impact performance. Instead, they should asynchronously dispatch received signals
to their processing logic.
ReactiveRow
Modifier and Type | Method and Description |
---|---|
default ReactiveResultSet |
executeReactive(com.datastax.oss.driver.api.core.cql.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. |
@NonNull default ReactiveResultSet executeReactive(@NonNull String query)
Publisher
that, once subscribed to, executes the given query and emits all
the results.query
- the query to execute.Publisher
that will publish the returned results.@NonNull default ReactiveResultSet executeReactive(@NonNull com.datastax.oss.driver.api.core.cql.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–2019. All rights reserved.