Class PromiseImpl<T>
java.lang.Object
com.github.tonivade.purefun.concurrent.PromiseImpl<T>
- All Implemented Interfaces:
Promise<T>,PromiseOf<T>,Applicable<Promise<?>,,T> Bindable<Promise<?>,,T> Mappable<Promise<?>,,T> Kind<Promise<?>,T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.tonivade.purefun.core.Applicable
Applicable.Map2<F extends Applicable<F,?>, A, B>, Applicable.Map3<F extends Applicable<F, ?>, A, B, C>, Applicable.Map4<F extends Applicable<F, ?>, A, B, C, D>, Applicable.Map5<F extends Applicable<F, ?>, A, B, C, D, E> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.tonivade.purefun.core.Applicable
zip, zipLeft, zipRight, zipWith
-
Field Details
-
lock
-
condition
-
consumers
-
reference
-
executor
-
-
Constructor Details
-
PromiseImpl
PromiseImpl(Executor executor)
-
-
Method Details
-
tryComplete
- Specified by:
tryCompletein interfacePromise<T>
-
await
-
await
-
isCompleted
public boolean isCompleted()- Specified by:
isCompletedin interfacePromise<T>
-
onComplete
- Specified by:
onCompletein interfacePromise<T>
-
ap
-
map
-
flatMap
-
current
-
safeGet
-
set
-
isEmpty
private boolean isEmpty() -
submit
-