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.
- Alphabetic
- By Inheritance
- ConcurrentRequests
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
app[F[_]](onIncrement: (Long) ⇒ F[Unit], onDecrement: (Long) ⇒ F[Unit])(implicit arg0: Async[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 andonDecrement
should never be value < 0.
-
def
app2[F[_], G[_]](onIncrement: (Long) ⇒ G[Unit], onDecrement: (Long) ⇒ G[Unit])(implicit arg0: Sync[F], arg1: Async[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 andonDecrement
should never be value < 0.This is the same as #app, but allows for the inner and outer effect types to differ.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
onChangeApp[F[_]](onChange: (Long) ⇒ F[Unit])(implicit arg0: Async[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.
-
def
onChangeRoute[F[_]](onChange: (Long) ⇒ F[Unit])(implicit arg0: Async[F]): F[ContextMiddleware[F, Long]]
As #route, but runs the same effect on increment and decrement of the concurrent request count.
-
def
route[F[_]](onIncrement: (Long) ⇒ F[Unit], onDecrement: (Long) ⇒ F[Unit])(implicit arg0: Async[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 andonDecrement
should never be value < 0.
-
def
route2[F[_], G[_]](onIncrement: (Long) ⇒ G[Unit], onDecrement: (Long) ⇒ G[Unit])(implicit arg0: Sync[F], arg1: Async[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 andonDecrement
should never be value < 0.This is the same as #route, but allows for the inner and outer effect types to differ.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()