Open

io.chrisdavenport.circuit.CircuitBreaker$.Open
final case class Open(startedAt: Timestamp, resetTimeout: FiniteDuration) extends State with Reason

State of the CircuitBreaker in which the circuit breaker rejects all tasks with a RejectedExecution.

Contract:

  • all tasks fail fast with RejectedExecution
  • after the configured resetTimeout, the circuit breaker enters a HalfOpen state, allowing one task to go through for testing the connection

Attributes

resetTimeout

is the current resetTimeout that is applied to this Open state, to be passed to the backoff function for the next transition from HalfOpen to Open, in case the reset attempt fails

startedAt

is the timestamp in milliseconds since the epoch when the transition to Open happened

Source:
CircuitBreaker.scala
Graph
Supertypes
trait Product
trait Equals
trait Reason
class State
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Concrete fields

The timestamp in milliseconds since the epoch, specifying when the Open state is to transition to HalfOpen.

The timestamp in milliseconds since the epoch, specifying when the Open state is to transition to HalfOpen.

It is calculated as:

startedAt + resetTimeout.toMillis

Attributes

Source:
CircuitBreaker.scala