Interface ExecutionFuture

  • All Superinterfaces:
    java.util.concurrent.Future<StatementResult>

    @Deprecated
    public interface ExecutionFuture
    extends java.util.concurrent.Future<StatementResult>
    Deprecated.
    since 3.3 in favor of ExecutionFuture
    An ExecutionFuture is a Future that provides a handle to an administrative statement that has been issued and is being processed by the kvstore. ExecutionFuture provides a way to check on the interim status of the administrative operation, wait for the operation completion, or cancel the operation.
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean cancel​(boolean mayInterruptIfRunning)
      Deprecated.
      Attempts to cancel execution of this statement.
      StatementResult get()
      Deprecated.
      Block until the command represented by this future completes.
      StatementResult get​(long timeout, java.util.concurrent.TimeUnit unit)
      Deprecated.
      Block until the administrative operation has finished or the timeout period is exceeded.
      StatementResult getLastStatus()
      Deprecated.
      Returns information about the execution of the statement.
      java.lang.String getStatement()
      Deprecated.
      Return the statement which has been executed.
      boolean isCancelled()
      Deprecated.
      Returns true if the operation was cancelled.
      boolean isDone()
      Deprecated.
      Returns true if the operation has been terminated.
      StatementResult updateStatus()
      Deprecated.
      Returns information about the execution of the statement.
    • Method Detail

      • cancel

        boolean cancel​(boolean mayInterruptIfRunning)
                throws FaultException
        Deprecated.
        Attempts to cancel execution of this statement. Returns false if the statement couldn't be cancelled, possibly because it has already finished. If the statement hasn't succeeded already, and is stopped, the operation will deem to have failed.
        Specified by:
        cancel in interface java.util.concurrent.Future<StatementResult>
        Parameters:
        mayInterruptIfRunning - Since command execution begins immediately, if mayInterreuptIfRunning is false, cancel returns false.
        Throws:
        FaultException - if the Admin service connection fails.
      • get

        StatementResult get()
                     throws java.util.concurrent.CancellationException,
                            java.util.concurrent.ExecutionException,
                            java.lang.InterruptedException
        Deprecated.
        Block until the command represented by this future completes. Returns information about the execution of the statement. This call will result in communication with the kvstore server.

        Note that ExecutionException is thrown if the statement execution threw an exception. Once get() throws ExecutionException, all further calls to get() will continue to throw ExecutionException.

        Specified by:
        get in interface java.util.concurrent.Future<StatementResult>
        Throws:
        java.util.concurrent.ExecutionException - if the command failed.
        java.util.concurrent.CancellationException - if the command was cancelled.
        java.lang.InterruptedException - if the current thread was interrupted
        FaultException - if tbw
      • get

        StatementResult get​(long timeout,
                            java.util.concurrent.TimeUnit unit)
                     throws java.lang.InterruptedException,
                            java.util.concurrent.TimeoutException,
                            java.util.concurrent.ExecutionException
        Deprecated.
        Block until the administrative operation has finished or the timeout period is exceeded. This call will result in communication with the kvstore server.

        Note that ExecutionException is thrown if the statement execution threw an exception. Once get() throws ExecutionException, all further calls to get() will continue to throw ExecutionException.

        Specified by:
        get in interface java.util.concurrent.Future<StatementResult>
        Returns:
        information about the execution of the statement
        Throws:
        java.util.concurrent.TimeoutException - if the timeout is exceeded.
        java.lang.InterruptedException - if the operation is interrupted
        java.util.concurrent.ExecutionException
      • isCancelled

        boolean isCancelled()
        Deprecated.
        Returns true if the operation was cancelled. The cancellation may still be in progress, and the operation may still be running.
        Specified by:
        isCancelled in interface java.util.concurrent.Future<StatementResult>
      • isDone

        boolean isDone()
        Deprecated.
        Returns true if the operation has been terminated. If the operation is still executing, or if status has never been requested before, this call will result in communication with the kvstore server to obtain up to date status.

        When the statement has terminated, results and status can be obtained via StatementResult

        Specified by:
        isDone in interface java.util.concurrent.Future<StatementResult>
      • updateStatus

        StatementResult updateStatus()
                              throws FaultException
        Deprecated.
        Returns information about the execution of the statement. If the statement is still executing, this call will result in communication with the kvstore server to obtain up to date status, and the status returned will reflect interim information.
        Throws:
        FaultException - if there was any problem with accessing the server. In general, such issues are transient, and the request can be retried.
      • getLastStatus

        StatementResult getLastStatus()
        Deprecated.
        Returns information about the execution of the statement. The information returned is that obtained by the last communication with the kvstore server, and will not cause any additional communication. To request a current check, use updateStatus()
      • getStatement

        java.lang.String getStatement()
        Deprecated.
        Return the statement which has been executed.