Class/Object

org.squbs.streams.circuitbreaker.impl

AtomicCircuitBreakerState

Related Docs: object AtomicCircuitBreakerState | package impl

Permalink

class AtomicCircuitBreakerState extends AbstractAtomicCircuitBreakerLogic with CircuitBreakerState

A CircuitBreakerState implementation based on Atomic variables.

Linear Supertypes
CircuitBreakerState, AbstractAtomicCircuitBreakerLogic, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AtomicCircuitBreakerState
  2. CircuitBreakerState
  3. AbstractAtomicCircuitBreakerLogic
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AtomicCircuitBreakerState(name: String, scheduler: Scheduler, maxFailures: Int, callTimeout: FiniteDuration, resetTimeout: FiniteDuration, maxResetTimeout: FiniteDuration, exponentialBackoffFactor: Double, metricRegistry: MetricRegistry = new MetricRegistry())(implicit executor: ExecutionContext)

    Permalink

    name

    used to differentiate circuit breakers in metrics

    scheduler

    used to schedule reset attempt

    maxFailures

    maximum number of failures before opening the circuit

    callTimeout

    scala.concurrent.duration.FiniteDuration of time after which to consider a call a failure

    resetTimeout

    scala.concurrent.duration.FiniteDuration of time after which to attempt to close the circuit

    maxResetTimeout

    the upper bound of resetTimeout

    exponentialBackoffFactor

    The exponential amount that the wait time will be increased

    executor

    scala.concurrent.ExecutionContext used for execution of the scheduler

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. object StateGauge extends Gauge[State]

    Permalink
    Definition Classes
    CircuitBreakerState
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. final def attemptReset(): Unit

    Permalink

    Attempts to reset breaker by transitioning to HalfOpen state.

    Attempts to reset breaker by transitioning to HalfOpen state. This is valid from Open state only.

    Attributes
    protected
    Definition Classes
    CircuitBreakerState
  7. val beanName: ObjectName

    Permalink
    Definition Classes
    CircuitBreakerState
  8. val callTimeout: FiniteDuration

    Permalink

    scala.concurrent.duration.FiniteDuration of time after which to consider a call a failure

    scala.concurrent.duration.FiniteDuration of time after which to consider a call a failure

    Definition Classes
    AtomicCircuitBreakerStateCircuitBreakerState
  9. final def checkAndMarkIfShortCircuit(): Boolean

    Permalink

    Check if circuit should be short circuited.

    Check if circuit should be short circuited.

    Definition Classes
    CircuitBreakerState
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def currentState: State

    Permalink

    Get the current state of the Circuit Breaker.

    Get the current state of the Circuit Breaker.

    returns

    the current state

    Definition Classes
    AtomicCircuitBreakerStateCircuitBreakerState
  12. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. val exponentialBackoffFactor: Double

    Permalink

    The exponential amount that the wait time will be increased

    The exponential amount that the wait time will be increased

    Definition Classes
    AtomicCircuitBreakerStateCircuitBreakerState
  15. def fails(): Unit

    Permalink

    Mark a failed call through CircuitBreaker.

    Mark a failed call through CircuitBreaker.

    Definition Classes
    AtomicCircuitBreakerStateCircuitBreakerState
  16. def finalize(): Unit

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

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

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

    Permalink
    Definition Classes
    Any
  20. def isShortCircuited: Boolean

    Permalink

    Check if circuit should be short circuited.

    Check if circuit should be short circuited.

    returns

    true if short circuited

    Definition Classes
    AtomicCircuitBreakerStateCircuitBreakerState
  21. val mBeanServer: MBeanServer

    Permalink
    Definition Classes
    CircuitBreakerState
  22. final def markFailure(): Unit

    Permalink

    Mark a failed element/response/call through CircuitBreaker.

    Mark a failed element/response/call through CircuitBreaker.

    Definition Classes
    CircuitBreakerState
  23. final def markSuccess(): Unit

    Permalink

    Mark a successful element/response/call through CircuitBreaker.

    Mark a successful element/response/call through CircuitBreaker.

    Definition Classes
    CircuitBreakerState
  24. val maxFailures: Int

    Permalink

    maximum number of failures before opening the circuit

    maximum number of failures before opening the circuit

    Definition Classes
    AtomicCircuitBreakerStateCircuitBreakerState
  25. val maxResetTimeout: FiniteDuration

    Permalink

    the upper bound of resetTimeout

    the upper bound of resetTimeout

    Definition Classes
    AtomicCircuitBreakerStateCircuitBreakerState
  26. val metricRegistry: MetricRegistry

    Permalink
  27. val name: String

    Permalink

    used to differentiate circuit breakers in metrics

    used to differentiate circuit breakers in metrics

    Definition Classes
    AtomicCircuitBreakerStateCircuitBreakerState
  28. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  31. final def resetBreaker(): Unit

    Permalink

    Resets breaker to Closed state.

    Resets breaker to Closed state. This is valid from HalfOpen state only.

    Attributes
    protected
    Definition Classes
    CircuitBreakerState
  32. val resetTimeout: FiniteDuration

    Permalink

    scala.concurrent.duration.FiniteDuration of time after which to attempt to close the circuit

    scala.concurrent.duration.FiniteDuration of time after which to attempt to close the circuit

    Definition Classes
    AtomicCircuitBreakerStateCircuitBreakerState
  33. def subscribe(subscriber: ActorRef, to: EventType): Boolean

    Permalink

    Subscribe an ActorRef to receive events that it's interested in.

    Subscribe an ActorRef to receive events that it's interested in.

    subscriber

    ActorRef that would receive the events

    to

    event types that this ActorRef is interested in

    returns

    true if subscription is successful

    Definition Classes
    CircuitBreakerState
  34. def succeeds(): Unit

    Permalink

    Mark a successful call through CircuitBreaker.

    Mark a successful call through CircuitBreaker.

    Definition Classes
    AtomicCircuitBreakerStateCircuitBreakerState
  35. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  36. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  37. final def transition(fromState: State, toState: State): Unit

    Permalink

    Implements consistent transition between states.

    Implements consistent transition between states. Throws IllegalStateException if an invalid transition is attempted.

    fromState

    State being transitioning from

    toState

    State being transitioning to

    Attributes
    protected
    Definition Classes
    CircuitBreakerState
  38. def transitionImpl(fromState: State, toState: State): Boolean

    Permalink

    Implements consistent transition between states.

    Implements consistent transition between states. Throws IllegalStateException if an invalid transition is attempted.

    fromState

    State being transitioning from

    toState

    State being transitioning from

    Definition Classes
    AtomicCircuitBreakerStateCircuitBreakerState
  39. final def tripBreaker(fromState: State): Unit

    Permalink

    Trips breaker to an open state.

    Trips breaker to an open state. This is valid from Closed or HalfOpen states.

    fromState

    State we're coming from (Closed or HalfOpen)

    Attributes
    protected
    Definition Classes
    CircuitBreakerState
  40. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. def withMetricRegistry(metricRegistry: MetricRegistry): AtomicCircuitBreakerState

    Permalink

    The provided MetricRegistry will be used to register metrics

    The provided MetricRegistry will be used to register metrics

    metricRegistry

    the registry to use for codahale metrics

    Definition Classes
    AtomicCircuitBreakerStateCircuitBreakerState

Inherited from CircuitBreakerState

Inherited from AbstractAtomicCircuitBreakerLogic

Inherited from AnyRef

Inherited from Any

Ungrouped