Future containing the value of this promise.
Returns whether the promise has already been completed with a value or an exception.
Returns whether the promise has already been completed with a value or an exception.
Note: Using this method may result in non-deterministic concurrent programs.
true
if the promise is already completed, false
otherwise
Tries to complete the promise with either a value or the exception.
Tries to complete the promise with either a value or the exception.
Note: Using this method may result in non-deterministic concurrent programs.
If the promise has already been completed returns false
, or true
otherwise.
Completes the promise with either an exception or a value.
Completes the promise with either an exception or a value.
Either the value or the exception to complete the promise with. If the promise has already been fulfilled, failed or has timed out, calling this method will throw an IllegalStateException.
Completes this promise with the specified future, once that future is completed.
Completes this promise with the specified future, once that future is completed.
This promise
Completes the promise with an exception.
Completes the promise with an exception.
The throwable to complete the promise with.
If the throwable used to fail this promise is an error, a control exception
or an interrupted exception, it will be wrapped as a cause within an
ExecutionException
which will fail the promise.
If the promise has already been fulfilled, failed or has timed out,
calling this method will throw an IllegalStateException.
Completes the promise with a value.
Completes the promise with a value.
The value to complete the promise with. If the promise has already been fulfilled, failed or has timed out, calling this method will throw an IllegalStateException.
Attempts to complete this promise with the specified future, once that future is completed.
Attempts to complete this promise with the specified future, once that future is completed.
This promise
Tries to complete the promise with an exception.
Tries to complete the promise with an exception.
Note: Using this method may result in non-deterministic concurrent programs.
If the promise has already been completed returns false
, or true
otherwise.
Tries to complete the promise with a value.
Tries to complete the promise with a value.
Note: Using this method may result in non-deterministic concurrent programs.
If the promise has already been completed returns false
, or true
otherwise.
Promise is an object which can be completed with a value or failed with an exception.