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
Ordering
- Alphabetic
- By Inheritance
Inherited
- BatchedFunction
- Pauseable
- Function2
- Function1
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def andThen[A](g: (Future[B]) => A): (Seq[A]) => A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- def apply(argument: A): Future[B]
- def apply(arguments: Seq[A]): Future[B]
- Definition Classes
- BatchedFunction → Function1
- 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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def cancelAll(): Unit
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def compose[A](g: (A) => Seq[A]): (A) => Future[B]
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- def currentFuture(): Future[B]
- def curried: (Seq[A]) => (() => Unit) => Future[B]
- Definition Classes
- Function2
- Annotations
- @unspecialized()
- def doPause(): Unit
- Definition Classes
- Pauseable
- def doUnpause(): Unit
- Definition Classes
- BatchedFunction → Pauseable
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final val isPaused: AtomicBoolean
- Definition Classes
- Pauseable
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def pause(): Unit
- Definition Classes
- Pauseable
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Function2 → AnyRef → Any
- def tupled: ((Seq[A], () => Unit)) => Future[B]
- Definition Classes
- Function2
- Annotations
- @unspecialized()
- final def unpause(): Unit
- Definition Classes
- Pauseable
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated