Interface IgniteInternalFuture<R>

    • Method Detail

      • isDone

        boolean isDone()
        Checks if computation is done.
        Returns:
        True if computation is done, false otherwise.
      • isCancelled

        boolean isCancelled()
        Returns true if this computation was cancelled before it completed normally.
        Returns:
        True if this computation was cancelled before it completed normally.
      • listen

        void listen​(IgniteInClosure<? super IgniteInternalFuture<R>> lsnr)
        Registers listener closure to be asynchronously notified whenever future completes.
        Parameters:
        lsnr - Listener closure to register.
      • listen

        void listen​(IgniteRunnable lsnr)
        Registers listener closure to be asynchronously notified whenever future completes.
        Parameters:
        lsnr - Listener closure to register.
      • chain

        <T> IgniteInternalFuture<T> chain​(IgniteClosure<? super IgniteInternalFuture<R>,​T> doneCb)
        Make a chained future to convert result of this future (when complete) into a new format. It is guaranteed that done callback will be called only ONCE.
        Parameters:
        doneCb - Done callback that is applied to this future when it finishes to produce chained future result.
        Returns:
        Chained future that finishes after this future completes and done callback is called.
      • chain

        <T> IgniteInternalFuture<T> chain​(IgniteOutClosure<T> doneCb)
        Make a chained future to convert result of this future (when complete) into a new format. It is guaranteed that done callback will be called only ONCE.
        Parameters:
        doneCb - Done callback that is applied to this future when it finishes to produce chained future result.
        Returns:
        Chained future that finishes after this future completes and done callback is called.
      • chain

        <T> IgniteInternalFuture<T> chain​(IgniteClosure<? super IgniteInternalFuture<R>,​T> doneCb,
                                          Executor exec)
        Make a chained future to convert result of this future (when complete) into a new format. It is guaranteed that done callback will be called only ONCE.
        Parameters:
        doneCb - Done callback that is applied to this future when it finishes to produce chained future result.
        exec - Executor to run callback.
        Returns:
        Chained future that finishes after this future completes and done callback is called.
      • chain

        <T> IgniteInternalFuture<T> chain​(IgniteOutClosure<T> doneCb,
                                          Executor exec)
        Make a chained future to convert result of this future (when complete) into a new format. It is guaranteed that done callback will be called only ONCE.
        Parameters:
        doneCb - Done callback that is applied to this future when it finishes to produce chained future result.
        exec - Executor to run callback.
        Returns:
        Chained future that finishes after this future completes and done callback is called.
      • chainCompose

        <T> IgniteInternalFuture<T> chainCompose​(IgniteClosure<? super IgniteInternalFuture<R>,​IgniteInternalFuture<T>> doneCb)
        Make a chained future that is completed when doneCb is executed. Callback is called with this future as the argument, when this future completes. It is guaranteed that done callback will be called only ONCE.
        Type Parameters:
        T - Type parameter.
        Parameters:
        doneCb - Done callback.
        Returns:
        Chained future.
      • chainCompose

        <T> IgniteInternalFuture<T> chainCompose​(IgniteClosure<? super IgniteInternalFuture<R>,​IgniteInternalFuture<T>> doneCb,
                                                 Executor exec)
        Make a chained future that is completed when doneCb is executed. Callback is called with this future as the argument, when this future completes. It is guaranteed that done callback will be called only ONCE.
        Type Parameters:
        T - Type parameter.
        Parameters:
        doneCb - Done callback.
        exec - Executor to run callback.
        Returns:
        Chained future.
      • error

        Throwable error()
        Returns:
        Error value if future has already been completed with error.
      • result

        R result()
        Returns:
        Result value if future has already been completed normally.