Class FutureUtils
java.lang.Object
com.here.platform.data.client.utils.FutureUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> scala.concurrent.Future<T>firstCompletedOf(scala.collection.IterableOnce<scala.concurrent.Future<T>> futures, scala.concurrent.ExecutionContext executor) static <A> scala.concurrent.Future<A>withTimeout(scala.concurrent.duration.FiniteDuration duration, String info, scala.Function0<scala.concurrent.Future<A>> f, org.apache.pekko.actor.ActorSystem actorSystem) static <A> scala.concurrent.Future<A>withTimeoutWithCleanup(scala.concurrent.duration.FiniteDuration duration, String info, scala.Function0<scala.concurrent.Future<A>> f, scala.Function1<A, scala.runtime.BoxedUnit> cleanUp, org.apache.pekko.actor.ActorSystem actorSystem) Allow to define a method to clean up the resource in the situation of timeout happens first
-
Constructor Details
-
FutureUtils
public FutureUtils()
-
-
Method Details
-
withTimeout
public static <A> scala.concurrent.Future<A> withTimeout(scala.concurrent.duration.FiniteDuration duration, String info, scala.Function0<scala.concurrent.Future<A>> f, org.apache.pekko.actor.ActorSystem actorSystem) -
withTimeoutWithCleanup
public static <A> scala.concurrent.Future<A> withTimeoutWithCleanup(scala.concurrent.duration.FiniteDuration duration, String info, scala.Function0<scala.concurrent.Future<A>> f, scala.Function1<A, scala.runtime.BoxedUnit> cleanUp, org.apache.pekko.actor.ActorSystem actorSystem) Allow to define a method to clean up the resource in the situation of timeout happens first -
firstCompletedOf
public static <T> scala.concurrent.Future<T> firstCompletedOf(scala.collection.IterableOnce<scala.concurrent.Future<T>> futures, scala.concurrent.ExecutionContext executor)
-