V - - type of the return value for the asynchronous operation.public interface SettableFuture<V>
SettableFuture.
To mark the asynchronous operation as finished, set the value for the Future using set(Object). setProgress(int)
and setProgressStatus(String) can be used to set the progress of the asynchronous operation| Modifier and Type | Method and Description |
|---|---|
V |
get()
Return the value stored by this SettableFuture.
|
int |
getProgress()
Return the progress (in percentage) for the asynchronous operation
Value should be between 0 and 100.
|
String |
getProgressStatus()
Get the progress status for the asynchronous operation
|
boolean |
isDone()
To find out if the asynchronous operation has finished execution or not.
|
boolean |
set(V newValue)
Sets the value of this future.
|
boolean |
setException(Throwable throwable)
Sets the future to having failed with the given exception.
|
void |
setProgress(int progress)
Set the progress (in percentage) for the asynchronous operation
Value should be between 0 and 100.
|
void |
setProgressStatus(String progressStatus)
Set the progress status for the asynchronous operation e.g.
|
boolean set(V newValue)
true if the value was successfully set, or false if the future has
already been set.newValue - the value the future should hold.boolean setException(Throwable throwable)
true if the exception was successfully set, or
false if the future has already been set.t - the exception the future should hold.V get() throws InterruptedException, ExecutionException
InterruptedExceptionExecutionExceptionboolean isDone()
int getProgress()
void setProgress(int progress)
progress - the progress to setvoid setProgressStatus(String progressStatus)
progressStatus - String getProgressStatus()
Copyright © 2015 Cloud Software Group, Inc.. All Rights Reserved.