Class ConcurrencyUtilsKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static <V extends Any, W extends Any> W match(Future<V> $self, Function1<V, W> success, Function1<Throwable, W> failure) Invoke getOrThrow and pass the value/throwable to success/failure respectively.
      final static <V extends Any, W extends Any> CordaFuture<W> firstOf(CordaFuture<out V> futures, Function1<CordaFuture<out V>, W> handler) As soon as a given future becomes done, the handler is invoked with that future as its argument.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • match

         final static <V extends Any, W extends Any> W match(Future<V> $self, Function1<V, W> success, Function1<Throwable, W> failure)

        Invoke getOrThrow and pass the value/throwable to success/failure respectively.

      • firstOf

         final static <V extends Any, W extends Any> CordaFuture<W> firstOf(CordaFuture<out V> futures, Function1<CordaFuture<out V>, W> handler)

        As soon as a given future becomes done, the handler is invoked with that future as its argument. The result of the handler is copied into the result future, and the handler isn't invoked again. If a given future errors after the result future is done, the error is automatically logged.