Class/Object

org.squbs.streams.circuitbreaker

CircuitBreakerSettings

Related Docs: object CircuitBreakerSettings | package circuitbreaker

Permalink

case class CircuitBreakerSettings[In, Out, Context] extends Product with Serializable

A container to hold circuit breaker settings.

Circuit Breaker functionality requires each element to be uniquely identified, so it requires a Context, of any type defined by the application, to be carried along with the flow's input and output as a Tuple2 (Scala) or Pair (Java). The requirement is that either the Context itself or a mapping from Context should be able to uniquely identify an element. Here is the ways how a unique id can be retrieved:

uniqueIdMapper
In

the type of the elements pulled from the upstream along with the Context and pushed down to joined flow

Out

the type that's contained in a Try and pushed downstream along with the Context

Context

the type of the context that is carried around along with the elements. The context may be of any type that can be used to uniquely identify each element

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CircuitBreakerSettings
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. val circuitBreakerState: CircuitBreakerState

    Permalink

    the CircuitBreakerState implementation that holds the state of the circuit breaker

  6. val cleanUp: (Out) ⇒ Unit

    Permalink

    an optional clean up function to be applied on timed out elements when pushed

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. val failureDecider: Option[(Try[Out]) ⇒ Boolean]

    Permalink

    the function that gets called to determine if an element pased by the joined Flow is actually a failure or not

  10. val fallback: Option[(In) ⇒ Try[Out]]

    Permalink

    the function that gets called to provide an alternative response when the circuit is OPEN

  11. def finalize(): Unit

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

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

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

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  18. val uniqueIdMapper: (Context) ⇒ Option[Any]

    Permalink

    the function that maps Context to a unique id

  19. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. def withCleanUp(cleanUp: (Out) ⇒ Unit): CircuitBreakerSettings[In, Out, Context]

    Permalink
  23. def withFailureDecider(failureDecider: (Try[Out]) ⇒ Boolean): CircuitBreakerSettings[In, Out, Context]

    Permalink
  24. def withFallback(fallback: (In) ⇒ Try[Out]): CircuitBreakerSettings[In, Out, Context]

    Permalink
  25. def withUniqueIdMapper(uniqueIdMapper: (Context) ⇒ Option[Any]): CircuitBreakerSettings[In, Out, Context]

    Permalink

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped