com.twitter.finagle.failters

RejectFailter

Related Doc: package failters

case class RejectFailter[Req, Rep](probability: Var[Double], rejectWith: () ⇒ Throwable = ..., seed: Long = Failter.DefaultSeed, stats: StatsReceiver = NullStatsReceiver) extends SimpleFilter[Req, Rep] with Failter with Product with Serializable

Randomly creates a Future.exception with the specified exception class before calling downstream filters and services. Probability is in [0,1] where 0 means no failures.

probability
rejectWith

A class to reject with. Must have a no-arguments constructor.

seed

A random seed, otherwise a deterministic seed is used.

Linear Supertypes
Serializable, Serializable, Product, Equals, Failter, SimpleFilter[Req, Rep], Filter[Req, Rep, Req, Rep], (Req, Service[Req, Rep]) ⇒ Future[Rep], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. RejectFailter
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Failter
  7. SimpleFilter
  8. Filter
  9. Function2
  10. AnyRef
  11. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RejectFailter(probability: Var[Double], rejectWith: () ⇒ Throwable = ..., seed: Long = Failter.DefaultSeed, stats: StatsReceiver = NullStatsReceiver)

    probability
    rejectWith

    A class to reject with. Must have a no-arguments constructor.

    seed

    A random seed, otherwise a deterministic seed is used.

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]

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

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

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

    Definition Classes
    RejectFailter → Filter → 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 finalize(): Unit

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

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

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

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

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

    Definition Classes
    AnyRef
  20. val passedStat: Counter

    Attributes
    protected
    Definition Classes
    Failter
  21. var prob: Double

    Attributes
    protected
    Definition Classes
    Failter
  22. val probGauge: Unit

    Attributes
    protected
    Definition Classes
    Failter
  23. val probability: Var[Double]

    Definition Classes
    RejectFailterFailter
  24. val rand: Random

    Attributes
    protected
    Definition Classes
    Failter
  25. val rejectWith: () ⇒ Throwable

    A class to reject with.

    A class to reject with. Must have a no-arguments constructor.

  26. val rejectedStat: Counter

    Attributes
    protected
    Definition Classes
    Failter
  27. val seed: Long

    A random seed, otherwise a deterministic seed is used.

    A random seed, otherwise a deterministic seed is used.

    Definition Classes
    RejectFailterFailter
  28. val stats: StatsReceiver

    Definition Classes
    RejectFailterFailter
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. def toString(): String

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

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Failter

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