Package io.vavr.concurrent
Class PromiseImpl<T>
java.lang.Object
io.vavr.concurrent.PromiseImpl<T>
- Type Parameters:
T
- result type
- All Implemented Interfaces:
Promise<T>
Internal
Promise
implementation.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.vavr.concurrent.Promise
complete, completeWith, failure, isCompleted, success, tryCompleteWith, tryFailure, trySuccess
-
Field Details
-
future
-
-
Constructor Details
-
PromiseImpl
PromiseImpl(FutureImpl<T> future)
-
-
Method Details
-
executor
Description copied from interface:Promise
-
executorService
Deprecated.Description copied from interface:Promise
This method is deprecated.THE DEFAULT IMPLEMENTATION (obtained by one of the
Promise
factory methods) MIGHT THROW ANUnsupportedOperationException
AT RUNTIME, DEPENDING ON WHATFuture.executorService()
returns.- Specified by:
executorService
in interfacePromise<T>
- Returns:
- (never)
-
future
Description copied from interface:Promise
Returns the underlyingFuture
of thisPromise
. -
tryComplete
Description copied from interface:Promise
Attempts to completes thisPromise
with the givenvalue
.- Specified by:
tryComplete
in interfacePromise<T>
- Parameters:
value
- Either aTry.Success
containing the result or aTry.Failure
containing an exception.- Returns:
false
if thisPromise
has already been completed,true
otherwise.
-
toString
-