Interface SubscriptionQueryResult
-
public interface SubscriptionQueryResultInterface describing the results of a subscription query. This type of query consists of an initial response, representing the state of a projection at the start of the query, and a stream of updates which represent the updates to the model since the query started.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description CompletableFuture<QueryResponse>initialResult()Deprecated, for removal: This API element is subject to removal in a future version.in favor ofinitialResults(), which returns a stream of results.ResultStream<QueryResponse>initialResults()Returns a ResultStream that represent the initial result of the subscription query.ResultStream<QueryUpdate>updates()Returns the stream of updates to the queried projection.
-
-
-
Method Detail
-
initialResult
@Deprecated(since="2025.2.0", forRemoval=true) CompletableFuture<QueryResponse> initialResult()
Deprecated, for removal: This API element is subject to removal in a future version.in favor ofinitialResults(), which returns a stream of results.Returns a CompletableFuture that completes when the initial result of the query is available. If an error occurred while querying, the CompletableFuture completes exceptionally.Invoking this method will send a request for the initial result, if that hasn't been requested before. Subsequent invocations of this method will return the same CompletableFuture instance.
Note that calling this method will not prevent the
initialResults()call from retrieving a new set of initial results, or vice versa.- Returns:
- a CompletableFuture that completes with the initial result of the subscription query
-
initialResults
ResultStream<QueryResponse> initialResults()
Returns a ResultStream that represent the initial result of the subscription query.Invoking this method will send a request for the initial result if that hasn't been requested before. Further invocations of this method will return the same ResultStream instance.
- Returns:
- a ResultStream that provides the initial result of the subscription query
-
updates
ResultStream<QueryUpdate> updates()
Returns the stream of updates to the queried projection. The stream can be read in a blocking and non-blocking fashion, as desired by downstream processes.Multiple invocation of this method will return the same stream instance.
- Returns:
- a stream of updates
-
-