src/jdk.incubator.adba/share/classes/jdk/incubator/sql2/RowPublisherOperation.java
branchJDK-8188051-branch
changeset 56797 fb523d4d9185
child 56997 c9cbac2979fb
equal deleted inserted replaced
56796:69b384805d61 56797:fb523d4d9185
       
     1 /*
       
     2  * To change this license header, choose License Headers in Project Properties.
       
     3  * To change this template file, choose Tools | Templates
       
     4  * and open the template in the editor.
       
     5  */
       
     6 package jdk.incubator.sql2;
       
     7 
       
     8 import java.time.Duration;
       
     9 import java.util.concurrent.CompletionStage;
       
    10 import java.util.concurrent.Flow;
       
    11 import java.util.function.Consumer;
       
    12 
       
    13 public interface RowPublisherOperation<T> extends Operation<T> {
       
    14 
       
    15   /**
       
    16    * * DRAFT Subscribe to the stream of Rows returned by this Operation. The
       
    17    * result of this Operation is the value of the {@code result} parameter.
       
    18    *
       
    19    * @param subscriber Not null.
       
    20    * @param result Not null.
       
    21    * @return this RowPublisherOperation
       
    22    */
       
    23   public RowPublisherOperation<T> subscribe(Flow.Subscriber<? super Result.RowColumn> subscriber,
       
    24                                             CompletionStage<? extends T> result);
       
    25   // Covariant overrides
       
    26   
       
    27   @Override
       
    28   public RowPublisherOperation<T> onError(Consumer<Throwable> handler);
       
    29   
       
    30   @Override
       
    31   public RowPublisherOperation<T> timeout(Duration minTime);
       
    32   
       
    33 }