Interface GridClientFuture<R>

  • All Known Implementing Classes:
    GridClientFutureAdapter

    public interface GridClientFuture<R>
    Future for asynchronous operations.
    • Method Detail

      • get

        R get​(long timeout,
              TimeUnit unit)
        throws GridClientException
        Synchronously waits for completion and returns result.
        Parameters:
        timeout - Timeout interval to wait future completes.
        unit - Timeout interval unit to wait future completes.
        Returns:
        Completed future result.
        Throws:
        GridClientException - In case of error.
        GridClientFutureTimeoutException - If timed out before future finishes.
      • isDone

        boolean isDone()
        Checks if future is done.
        Returns:
        Whether future is done.
      • listen

        void listen​(GridClientFutureListener<R>... lsnrs)
        Register new listeners for notification when future completes. Note that current implementations are calling listeners in the completing thread.
        Parameters:
        lsnrs - Listeners to be registered.