Class FastFuture<A>


  • public class FastFuture<A>
    extends scala.AnyVal
    Provides alternative implementations of the basic transformation operations defined on Future, which try to avoid scheduling to an ExecutionContext if possible, i.e. if the given future value is already present.
    • Constructor Summary

      Constructors 
      Constructor Description
      FastFuture​(scala.concurrent.Future<A> future)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> scala.concurrent.Future<T> apply​(scala.util.Try<T> value)  
      static scala.Function1<java.lang.Throwable,​scala.concurrent.Future<scala.runtime.Nothing$>> failed()  
      scala.concurrent.Future<A> filter​(scala.Function1<A,​java.lang.Object> pred, scala.concurrent.ExecutionContext executor)  
      <B> scala.concurrent.Future<B> flatMap​(scala.Function1<A,​scala.concurrent.Future<B>> f, scala.concurrent.ExecutionContext ec)  
      void foreach​(scala.Function1<A,​scala.runtime.BoxedUnit> f, scala.concurrent.ExecutionContext ec)  
      scala.concurrent.Future<A> future()  
      <B> scala.concurrent.Future<B> map​(scala.Function1<A,​B> f, scala.concurrent.ExecutionContext ec)  
      <B> scala.concurrent.Future<B> recover​(scala.PartialFunction<java.lang.Throwable,​B> pf, scala.concurrent.ExecutionContext ec)  
      <B> scala.concurrent.Future<B> recoverWith​(scala.PartialFunction<java.lang.Throwable,​scala.concurrent.Future<B>> pf, scala.concurrent.ExecutionContext ec)  
      static <T,​M extends scala.collection.IterableOnce<java.lang.Object>>
      scala.concurrent.Future<M>
      sequence​(M in, scala.collection.BuildFrom<M,​T,​M> cbf, scala.concurrent.ExecutionContext executor)  
      static <T> scala.Function1<T,​scala.concurrent.Future<T>> successful()  
      <B> scala.concurrent.Future<B> transformWith​(scala.Function1<A,​scala.concurrent.Future<B>> s, scala.Function1<java.lang.Throwable,​scala.concurrent.Future<B>> f, scala.concurrent.ExecutionContext executor)  
      <B> scala.concurrent.Future<B> transformWith​(scala.Function1<scala.util.Try<A>,​scala.concurrent.Future<B>> f, scala.concurrent.ExecutionContext executor)  
      static <A,​B,​M extends scala.collection.IterableOnce<java.lang.Object>>
      scala.concurrent.Future<M>
      traverse​(M in, scala.Function1<A,​scala.concurrent.Future<B>> fn, scala.collection.BuildFrom<M,​B,​M> cbf, scala.concurrent.ExecutionContext executor)  
      • Methods inherited from class java.lang.Object

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

      • FastFuture

        public FastFuture​(scala.concurrent.Future<A> future)
    • Method Detail

      • apply

        public static <T> scala.concurrent.Future<T> apply​(scala.util.Try<T> value)
      • successful

        public static <T> scala.Function1<T,​scala.concurrent.Future<T>> successful()
      • failed

        public static scala.Function1<java.lang.Throwable,​scala.concurrent.Future<scala.runtime.Nothing$>> failed()
      • sequence

        public static <T,​M extends scala.collection.IterableOnce<java.lang.Object>> scala.concurrent.Future<M> sequence​(M in,
                                                                                                                              scala.collection.BuildFrom<M,​T,​M> cbf,
                                                                                                                              scala.concurrent.ExecutionContext executor)
      • traverse

        public static <A,​B,​M extends scala.collection.IterableOnce<java.lang.Object>> scala.concurrent.Future<M> traverse​(M in,
                                                                                                                                      scala.Function1<A,​scala.concurrent.Future<B>> fn,
                                                                                                                                      scala.collection.BuildFrom<M,​B,​M> cbf,
                                                                                                                                      scala.concurrent.ExecutionContext executor)
      • future

        public scala.concurrent.Future<A> future()
      • map

        public <B> scala.concurrent.Future<B> map​(scala.Function1<A,​B> f,
                                                  scala.concurrent.ExecutionContext ec)
      • flatMap

        public <B> scala.concurrent.Future<B> flatMap​(scala.Function1<A,​scala.concurrent.Future<B>> f,
                                                      scala.concurrent.ExecutionContext ec)
      • filter

        public scala.concurrent.Future<A> filter​(scala.Function1<A,​java.lang.Object> pred,
                                                 scala.concurrent.ExecutionContext executor)
      • foreach

        public void foreach​(scala.Function1<A,​scala.runtime.BoxedUnit> f,
                            scala.concurrent.ExecutionContext ec)
      • transformWith

        public <B> scala.concurrent.Future<B> transformWith​(scala.Function1<scala.util.Try<A>,​scala.concurrent.Future<B>> f,
                                                            scala.concurrent.ExecutionContext executor)
      • transformWith

        public <B> scala.concurrent.Future<B> transformWith​(scala.Function1<A,​scala.concurrent.Future<B>> s,
                                                            scala.Function1<java.lang.Throwable,​scala.concurrent.Future<B>> f,
                                                            scala.concurrent.ExecutionContext executor)
      • recover

        public <B> scala.concurrent.Future<B> recover​(scala.PartialFunction<java.lang.Throwable,​B> pf,
                                                      scala.concurrent.ExecutionContext ec)
      • recoverWith

        public <B> scala.concurrent.Future<B> recoverWith​(scala.PartialFunction<java.lang.Throwable,​scala.concurrent.Future<B>> pf,
                                                          scala.concurrent.ExecutionContext ec)