Object/Trait

upperbound

Limiter

Related Docs: trait Limiter | package upperbound

Permalink

object Limiter

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Limiter
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class LimitReachedException() extends Exception with Product with Serializable

    Permalink

    Signals that the number of jobs waiting to be executed has reached the maximum allowed number.

    Signals that the number of jobs waiting to be executed has reached the maximum allowed number. See Limiter.start

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply[F[_]](implicit l: Limiter[F]): Limiter[F]

    Permalink

    Summoner

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def await[F[_], A](job: F[A], priority: Int = 0)(implicit arg0: Concurrent[F], arg1: Limiter[F]): F[A]

    Permalink

    Returns an F[A] which represents the action of submitting fa to the Limiter with the given priority, and waiting for its result.

    Returns an F[A] which represents the action of submitting fa to the Limiter with the given priority, and waiting for its result. A higher number means a higher priority. The default is 0.

    The semantics of await are blocking: the returned F[A] only completes when job has finished its execution, returning the result of job or failing with the same error job failed with. However, the blocking is only semantic, no actual threads are blocked by the implementation.

    This method is designed to be called concurrently: every concurrent call submits a job, and they are all started at a rate which is no higher then the maximum rate you specify when constructing a Limiter.

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def noOp[F[_]](implicit arg0: Concurrent[F]): F[Limiter[F]]

    Permalink

    Creates a no-op Limiter, with no rate limiting and a synchronous submit method.

    Creates a no-op Limiter, with no rate limiting and a synchronous submit method. pending is always zero. interval is set to zero and changes to it have no effect.

  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def start[F[_]](maxRate: Rate, n: Int = Int.MaxValue)(implicit arg0: Concurrent[F], arg1: Timer[F]): Resource[F, Limiter[F]]

    Permalink

    Creates a new Limiter and starts processing the jobs submitted so it, which are started at a rate no higher than maxRate.

    Creates a new Limiter and starts processing the jobs submitted so it, which are started at a rate no higher than maxRate.

    Additionally, n allows you to place a bound on the maximum number of jobs allowed to queue up while waiting for execution. Once this number is reached, the F returned by any call to the Limiter will immediately fail with a LimitReachedException, so that you can in turn signal for backpressure downstream. Processing restarts as soon as the number of jobs waiting goes below n again. n defaults to Int.MaxValue if not specified.

  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped