Packages

final class BatchedFunction[A, B] extends (Seq[A]) => Future[B] with (Seq[A], () => Unit) => Future[B] with Pauseable

Helper to batch multiple asynchronous requests and ensure only one request is active at a time.

Linear Supertypes
Pauseable, (Seq[A], () => Unit) => Future[B], (Seq[A]) => Future[B], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BatchedFunction
  2. Pauseable
  3. Function2
  4. Function1
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new BatchedFunction(fn: (Seq[A]) => CancelableFuture[B])(implicit ec: ExecutionContext)

    fn

    the function to batch. It must be safe to group together arguments from different requests into a single request and respond to the aggregated requests with the aggregated response.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def andThen[A](g: (Future[B]) => A): (Seq[A]) => A
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  5. def apply(argument: A): Future[B]
  6. def apply(arguments: Seq[A]): Future[B]
    Definition Classes
    BatchedFunction → Function1
  7. def apply(arguments: Seq[A], callback: () => Unit): Future[B]

    Call the function with the given arguments.

    Call the function with the given arguments.

    It is safe to rapidly call this function multiple times. The first call triggers the function and subsequent arguments will be batched up together for another run once the first asynchronous call completes.

    returns

    the response from calling the batched function with potentially previously and/or subsequently batched arguments.

    Definition Classes
    BatchedFunction → Function2
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def cancelAll(): Unit
  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  11. def compose[A](g: (A) => Seq[A]): (A) => Future[B]
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  12. def currentFuture(): Future[B]
  13. def curried: (Seq[A]) => (() => Unit) => Future[B]
    Definition Classes
    Function2
    Annotations
    @unspecialized()
  14. def doPause(): Unit
    Definition Classes
    Pauseable
  15. def doUnpause(): Unit
    Definition Classes
    BatchedFunctionPauseable
  16. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  18. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  19. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. final val isPaused: AtomicBoolean
    Definition Classes
    Pauseable
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  25. final def pause(): Unit
    Definition Classes
    Pauseable
  26. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  27. def toString(): String
    Definition Classes
    Function2 → AnyRef → Any
  28. def tupled: ((Seq[A], () => Unit)) => Future[B]
    Definition Classes
    Function2
    Annotations
    @unspecialized()
  29. final def unpause(): Unit
    Definition Classes
    Pauseable
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Pauseable

Inherited from (Seq[A], () => Unit) => Future[B]

Inherited from (Seq[A]) => Future[B]

Inherited from AnyRef

Inherited from Any

Ungrouped