Class FutureUtils

java.lang.Object
com.here.platform.data.client.utils.FutureUtils

public class FutureUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <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

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)