-
- All Superinterfaces:
Operation<T>
,PrimitiveOperation<T>
- All Known Subinterfaces:
ParameterizedRowPublisherOperation<T>
public interface RowPublisherOperation<T> extends Operation<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RowPublisherOperation<T>
onError(java.util.function.Consumer<java.lang.Throwable> handler)
Provides an error handler for thisOperation
.RowPublisherOperation<T>
subscribe(java.util.concurrent.Flow.Subscriber<? super Result.RowColumn> subscriber, java.util.concurrent.CompletionStage<? extends T> result)
Subscribe to the stream of rows returned by thisOperation
.RowPublisherOperation<T>
timeout(java.time.Duration minTime)
The minimum time before thisOperation
might be canceled automatically.-
Methods inherited from interface jdk.incubator.sql2.PrimitiveOperation
submit
-
-
-
-
Method Detail
-
subscribe
RowPublisherOperation<T> subscribe(java.util.concurrent.Flow.Subscriber<? super Result.RowColumn> subscriber, java.util.concurrent.CompletionStage<? extends T> result)
Subscribe to the stream of rows returned by thisOperation
. The value of theresult
parameter is the result of thisOperation
.- Parameters:
subscriber
- Not null.result
- Not null.- Returns:
- this RowPublisherOperation
-
onError
RowPublisherOperation<T> onError(java.util.function.Consumer<java.lang.Throwable> handler)
Provides an error handler for thisOperation
. If execution of thisOperation
results in an error, before theOperation
is completed, the handler is called with theThrowable
as the argument. The type of theThrowable
is implementation dependent.
-
timeout
RowPublisherOperation<T> timeout(java.time.Duration minTime)
The minimum time before thisOperation
might be canceled automatically. The default value is forever. The time is counted from the beginning of Operation execution. The Operation will not be canceled beforeminTime
after the beginning of execution. Some time at leastminTime
after the beginning of execution, an attempt will be made to cancel theOperation
if it has not yet completed. Implementations are encouraged to attempt to cancel within a reasonable time, though what is reasonable is implementation dependent.
-
-