ExecutionFuture
@Deprecated public interface ExecutionFuture extends Future<StatementResult>
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.Modifier and Type | Method and 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,
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.
|
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.
|
boolean cancel(boolean mayInterruptIfRunning) throws FaultException
cancel
in interface Future<StatementResult>
mayInterruptIfRunning
- Since command execution begins immediately,
if mayInterreuptIfRunning is false, cancel returns false.FaultException
- if the Admin service connection fails.StatementResult get() throws CancellationException, ExecutionException, InterruptedException
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.
get
in interface Future<StatementResult>
ExecutionException
- if the command failed.CancellationException
- if the command was cancelled.InterruptedException
- if the current thread was interruptedFaultException
- if tbwStatementResult get(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, ExecutionException
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.
get
in interface Future<StatementResult>
TimeoutException
- if the timeout is exceeded.InterruptedException
ExecutionException
boolean isCancelled()
isCancelled
in interface Future<StatementResult>
boolean isDone()
When the statement has terminated, results and status can be obtained
via StatementResult
isDone
in interface Future<StatementResult>
StatementResult updateStatus() throws FaultException
FaultException
- if there was any problem with accessing the
server. In general, such issues are transient, and the request can
be retried.StatementResult getLastStatus()
updateStatus()
String getStatement()
Copyright (c) 2011, 2015 Oracle and/or its affiliates. All rights reserved.