Class CordaFutureImpl
-
- All Implemented Interfaces:
-
java.util.concurrent.Future
,net.corda.core.concurrent.CordaFuture
,net.corda.core.internal.concurrent.OpenFuture
,net.corda.core.internal.concurrent.ValueOrException
@VisibleForTesting() public final class CordaFutureImpl<V extends Object> implements Future<V>, OpenFuture<V>
Unless you really want this particular implementation, use openFuture to make one.
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
listenerFailedMessage
-
Constructor Summary
Constructors Constructor Description CordaFutureImpl(CompletableFuture<V> impl)
-
Method Summary
Modifier and Type Method Description Boolean
set(V value)
Boolean
setException(Throwable t)
<W extends Any> Unit
then(Function1<CordaFuture<V>, W> callback)
Run the given callback when this future is done, on the completion thread. final <W extends Any> Unit
,kotlin.jvm.functions.Function1)>thenImpl(<Error class: unknown class> log, Function1<CordaFuture<V>, ,kotlin.jvm.functions.Function1)>W> callback)
For testing only. <Error class: unknown class>
toCompletableFuture()
-
Methods inherited from class net.corda.core.internal.concurrent.ValueOrException
capture, captureLater
-
Methods inherited from class java.util.concurrent.Future
cancel, get, get, isCancelled, isDone
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
CordaFutureImpl
CordaFutureImpl(CompletableFuture<V> impl)
-
-
Method Detail
-
setException
Boolean setException(Throwable t)
-
then
<W extends Any> Unit then(Function1<CordaFuture<V>, W> callback)
Run the given callback when this future is done, on the completion thread. If the completion thread is problematic for you e.g. deadlock, you can submit to an executor manually. If callback fails, its throwable is logged.
-
thenImpl
final <W extends Any> Unit ,kotlin.jvm.functions.Function1)>thenImpl(<Error class: unknown class> log, Function1<CordaFuture<V>, ,kotlin.jvm.functions.Function1)>W> callback)
For testing only.
-
toCompletableFuture
<Error class: unknown class> toCompletableFuture()
-
-
-
-