package filter
- Alphabetic
- Public
- All
Type Members
-
class
DtabStatsFilter
[Req, Rep] extends SimpleFilter[Req, Rep]
Adds a Stat, dtab/local/size, that tracks the size of Dtab.local for all requests with a non-empty Dtab.
-
class
ExceptionSourceFilter
[Req, Rep] extends SimpleFilter[Req, Rep]
A com.twitter.finagle.Filter that sources exceptions.
A com.twitter.finagle.Filter that sources exceptions. The
serviceName
field of any com.twitter.finagle.SourcedException thrown by the underlying com.twitter.finagle.Service is set to theserviceName
argument of this filter. - trait LogFormatter [-Req, Rep] extends AnyRef
-
trait
LoggingFilter
[Req, Rep] extends SimpleFilter[Req, Rep]
A com.twitter.finagle.Filter that logs all requests according to formatter.
-
class
MaskCancelFilter
[Req, Rep] extends SimpleFilter[Req, Rep]
A com.twitter.finagle.Filter that prevents cancellations from propagating to any subsequent Services.
A com.twitter.finagle.Filter that prevents cancellations from propagating to any subsequent Services. i.e. when
Future.raise
is invoked on the result of this filter'sapply
method, the interrupt will not be propagated to the service. This is useful for lightweight protocols for which finishing a request is preferable to closing and reesstablishing a connection. -
class
MkJvmFilter
extends AnyRef
Given a Jvm, create filters to record GCs (and other JVM events in the future).
-
class
MonitorFilter
[Req, Rep] extends SimpleFilter[Req, Rep]
A com.twitter.finagle.Filter that handles exceptions (incl.
A com.twitter.finagle.Filter that handles exceptions (incl. raw) thrown by the subsequent com.twitter.finagle.Service. Exceptions are handled according to the argument com.twitter.util.Monitor.
-
class
RequestMeterFilter
[Req, Rep] extends SimpleFilter[Req, Rep]
A com.twitter.finagle.Filter that rate limits requests to a fixed rate over time by using the com.twitter.concurrent.AsyncMeter implementation.
A com.twitter.finagle.Filter that rate limits requests to a fixed rate over time by using the com.twitter.concurrent.AsyncMeter implementation. It can be used for slowing down access to throttled resources. Requests that cannot be enqueued to await a permit are failed immediately with a com.twitter.finagle.Failure that signals that the work was never done, so it's safe to reenqueue.
NOTE: If you're just trying not to be overwhelmed, you almost certainly want to use com.twitter.finagle.filter.RequestSemaphoreFilter instead, because RequestMeterFilter doesn't work well with "real" resources that are sometimes faster or slower (like a service that you're depending on that sometimes slows when it takes bursty traffic). This is better for resources that are artificially bounded, like a rate-limited API.
-
class
RequestSemaphoreFilter
[Req, Rep] extends SimpleFilter[Req, Rep]
A com.twitter.finagle.Filter that restricts request concurrency according to the given com.twitter.concurrent.AsyncSemaphore.
A com.twitter.finagle.Filter that restricts request concurrency according to the given com.twitter.concurrent.AsyncSemaphore. Requests that are unable to acquire a permit are failed immediately with a com.twitter.finagle.Failure that signals a restartable or idempotent process.
- See also
The user guide for more details.
Value Members
- object DtabStatsFilter
- object MaskCancelFilter
- object RequestSemaphoreFilter