corda / net.corda.core.internal.concurrent

Package net.corda.core.internal.concurrent

Types

OpenFuture

interface OpenFuture<V> : ValueOrException<V>, CordaFuture<V>

A CordaFuture with additional methods to complete it with a value, exception or the outcome of another future.

ValueOrException

interface ValueOrException<in V>

The contravariant members of OpenFuture.

Extensions for External Classes

java.util.concurrent.Executor

kotlin.collections.Collection

Functions

andForget

fun CordaFuture<*>.andForget(log: Logger): Unit

When this future is done and the outcome is failure, log the throwable.

doneFuture

fun <V> doneFuture(value: V): CordaFuture<V>

flatMap

fun <V, W> CordaFuture<out V>.flatMap(transform: (V) -> CordaFuture<out W>): CordaFuture<W>

Returns a future that will have the same outcome as the future returned by the given transform. But if this future or the transform fails, the returned future's outcome is the same throwable. In the case where this future fails, the transform is not invoked.

map

fun <V, W> CordaFuture<out V>.map(transform: (V) -> W): CordaFuture<W>

Returns a future that will have an outcome of applying the given transform to this future's value. But if this future fails, the transform is not invoked and the returned future becomes done with the same throwable.

openFuture

fun <V> openFuture(): OpenFuture<V>

thenMatch

fun <V, W, X> CordaFuture<out V>.thenMatch(success: (V) -> W, failure: (Throwable) -> X): Unit

When this future is done, do match.