Interface RowCountOperation<T>

    • Method Detail

      • apply

        RowCountOperation<T> apply​(java.util.function.Function<Result.RowCount,​? extends T> function)
        Sets the result processor for this Operation.
        Parameters:
        function - processes the count produced by executing this Operation and returns the result
        Returns:
        this RowCountOperation
        Throws:
        java.lang.IllegalStateException - if this method has been called previously
      • onError

        RowCountOperation<T> onError​(java.util.function.Consumer<java.lang.Throwable> handler)
        Provides an error handler for this Operation. If execution of this Operation results in an error, before the Operation is completed, the handler is called with the Throwable as the argument. The type of the Throwable is implementation dependent.
        Specified by:
        onError in interface Operation<T>
        Returns:
        this RowCountOperation
      • timeout

        RowCountOperation<T> timeout​(java.time.Duration minTime)
        The minimum time before this Operation 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 before minTime after the beginning of execution. Some time at least minTime after the beginning of execution, an attempt will be made to cancel the Operation if it has not yet completed. Implementations are encouraged to attempt to cancel within a reasonable time, though what is reasonable is implementation dependent.
        Specified by:
        timeout in interface Operation<T>
        Parameters:
        minTime - minimum time to wait before attempting to cancel
        Returns:
        this RowCountOperation