Corda Future
Same as Future with additional methods to provide some of the features of java.util.concurrent.CompletableFuture while minimising the API surface area. In Kotlin, to avoid compile errors, whenever CordaFuture is used in a parameter or extension method receiver type, its type parameter should be specified with out variance.
Inheritors
Functions
When this future is done and the outcome is failure, log the throwable.
Returns a future that will also apply the passed closure when it completes.
Returns a future that will also apply the passed closure on an error.
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.
Same as Future.get except that the ExecutionException is unwrapped.
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.
Returns a future that will map an error thrown using the provided transform function.
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.