o

org.http4s.server.middleware

ConcurrentRequests

object ConcurrentRequests

Middlewares for tracking the quantity of concurrent requests.

These are generalized middlewares and can be used to implement metrics, logging, max concurrent requests, etc.

Source
ConcurrentRequests.scala
Note

The concurrent request count is decremented on the completion of the Response body, or in the event of any error, and is guaranteed to only occur once.

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

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 app[F[_]](onIncrement: (Long) ⇒ F[Unit], onDecrement: (Long) ⇒ F[Unit])(implicit arg0: Sync[F]): F[(Kleisli[F, ContextRequest[F, Long], Response[F]]) ⇒ Kleisli[F, Request[F], Response[F]]]

    Run a side effect each time the concurrent request count increments and decrements.

    Run a side effect each time the concurrent request count increments and decrements.

    Note

    Each side effect is given the current number of concurrent requests as an argument.

    ,

    onIncrement should never be < 1 and onDecrement should never be value < 0.

  5. def app2[F[_], G[_]](onIncrement: (Long) ⇒ G[Unit], onDecrement: (Long) ⇒ G[Unit])(implicit arg0: Sync[F], arg1: Sync[G]): F[(Kleisli[G, ContextRequest[G, Long], Response[G]]) ⇒ Kleisli[G, Request[G], Response[G]]]

    Run a side effect each time the concurrent request count increments and decrements.

    Run a side effect each time the concurrent request count increments and decrements.

    Note

    Each side effect is given the current number of concurrent requests as an argument.

    ,

    onIncrement should never be < 1 and onDecrement should never be value < 0.

    ,

    This is the same as #app, but allows for the inner and outer effect types to differ.

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. def onChangeApp[F[_]](onChange: (Long) ⇒ F[Unit])(implicit arg0: Sync[F]): F[(Kleisli[F, ContextRequest[F, Long], Response[F]]) ⇒ Kleisli[F, Request[F], Response[F]]]

    As #app, but runs the same effect on increment and decrement of the concurrent request count.

  18. def onChangeRoute[F[_]](onChange: (Long) ⇒ F[Unit])(implicit arg0: Sync[F]): F[ContextMiddleware[F, Long]]

    As #route, but runs the same effect on increment and decrement of the concurrent request count.

  19. def route[F[_]](onIncrement: (Long) ⇒ F[Unit], onDecrement: (Long) ⇒ F[Unit])(implicit arg0: Sync[F]): F[ContextMiddleware[F, Long]]

    Run a side effect each time the concurrent request count increments and decrements.

    Run a side effect each time the concurrent request count increments and decrements.

    Note

    Each side effect is given the current number of concurrent requests as an argument.

    ,

    onIncrement should never be < 1 and onDecrement should never be value < 0.

  20. def route2[F[_], G[_]](onIncrement: (Long) ⇒ G[Unit], onDecrement: (Long) ⇒ G[Unit])(implicit arg0: Sync[F], arg1: Sync[G]): F[ContextMiddleware[G, Long]]

    Run a side effect each time the concurrent request count increments and decrements.

    Run a side effect each time the concurrent request count increments and decrements.

    Note

    Each side effect is given the current number of concurrent requests as an argument.

    ,

    onIncrement should never be < 1 and onDecrement should never be value < 0.

    ,

    This is the same as #route, but allows for the inner and outer effect types to differ.

  21. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  22. def toString(): String
    Definition Classes
    AnyRef → Any
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped