com.twitter.finagle.filter

RequestSemaphoreFilter

Related Docs: object RequestSemaphoreFilter | package filter

class RequestSemaphoreFilter[Req, Rep] extends SimpleFilter[Req, Rep]

A com.twitter.finagle.Filter that restricts request concurrency according to an argument com.twitter.concurrent.AsyncSemaphore. The number of concurrently-applied subsequent Services is bounded by the rate of permits doled out by the semaphore.

Linear Supertypes
SimpleFilter[Req, Rep], Filter[Req, Rep, Req, Rep], (Req, Service[Req, Rep]) ⇒ Future[Rep], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. RequestSemaphoreFilter
  2. SimpleFilter
  3. Filter
  4. Function2
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RequestSemaphoreFilter(sem: AsyncSemaphore)

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 andThen(factory: ServiceFactory[Req, Rep]): ServiceFactory[Req, Rep]

    Definition Classes
    Filter
  5. def andThen(f: (Req) ⇒ Future[Rep]): (Req) ⇒ Future[Rep]

    Definition Classes
    Filter
  6. def andThen(service: Service[Req, Rep]): Service[Req, Rep]

    Terminates a filter chain in a service.

    Terminates a filter chain in a service. For example,

    myFilter.andThen(myService)
    service

    a service that takes the output request type and the input response type.

    Definition Classes
    Filter
  7. def andThen[Req2, Rep2](next: Filter[Req, Rep, Req2, Rep2]): Filter[Req, Rep, Req2, Rep2]

    Chains a series of filters together:

    Chains a series of filters together:

    myModularService = handleExceptions.andThen(thrift2Pojo.andThen(parseString))

    Note: synchronously thrown exceptions in the underlying service are automatically lifted into Future.exception.

    next

    another filter to follow after this one

    Definition Classes
    Filter
  8. def andThenIf[Req2 >: Req, Rep2 <: Rep](condAndFilter: (Boolean, Filter[Req, Rep, Req2, Rep2])): Filter[Req, Rep, Req2, Rep2]

    Conditionally propagates requests down the filter chain.

    Conditionally propagates requests down the filter chain. This may useful if you are statically wiring together filter chains based on a configuration file, for instance.

    condAndFilter

    a tuple of boolean and filter.

    Definition Classes
    Filter
  9. def apply(req: Req, service: Service[Req, Rep]): Future[Rep]

    This is the method to override/implement to create your own Filter.

    This is the method to override/implement to create your own Filter.

    service

    a service that takes the output request type and the input response type

    Definition Classes
    RequestSemaphoreFilterFilter → Function2
  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def curried: (Req) ⇒ (Service[Req, Rep]) ⇒ Future[Rep]

    Definition Classes
    Function2
    Annotations
    @unspecialized()
  13. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

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

    Definition Classes
    AnyRef
  20. final def notify(): Unit

    Definition Classes
    AnyRef
  21. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def toString(): String

    Definition Classes
    Function2 → AnyRef → Any
  24. def tupled: ((Req, Service[Req, Rep])) ⇒ Future[Rep]

    Definition Classes
    Function2
    Annotations
    @unspecialized()
  25. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from SimpleFilter[Req, Rep]

Inherited from Filter[Req, Rep, Req, Rep]

Inherited from (Req, Service[Req, Rep]) ⇒ Future[Rep]

Inherited from AnyRef

Inherited from Any

Ungrouped