object CircuitBreakerProxy
This is an Actor which implements the circuit breaker pattern, you may also be interested in the raw circuit breaker akka.pattern.CircuitBreaker
- Annotations
- @deprecated
- Deprecated
(Since version 2.5.0) Use akka.pattern.CircuitBreaker + ask instead
- Source
- CircuitBreakerProxy.scala
- Alphabetic
- By Inheritance
- CircuitBreakerProxy
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- sealed trait CircuitBreakerCommand extends AnyRef
- sealed trait CircuitBreakerEvent extends AnyRef
-
final
case class
CircuitBreakerPropsBuilder(maxFailures: Int, callTimeout: Timeout, resetTimeout: Timeout, circuitEventListener: Option[ActorRef] = None, failureDetector: (Any) ⇒ Boolean = _ =>
false, openCircuitFailureConverter: (CircuitOpenFailure) ⇒ Any = identity) extends Product with Serializable - sealed trait CircuitBreakerResponse extends AnyRef
- sealed trait CircuitBreakerState extends AnyRef
- final case class CircuitBreakerStateData(failureCount: Int = 0, firstHalfOpenMessageSent: Boolean = false) extends Product with Serializable
- final case class CircuitClosed(circuit: ActorRef) extends CircuitBreakerCommand with Product with Serializable
- final case class CircuitHalfOpen(circuit: ActorRef) extends CircuitBreakerCommand with Product with Serializable
- final case class CircuitOpen(circuit: ActorRef) extends CircuitBreakerCommand with Product with Serializable
- final case class CircuitOpenFailure(failedMsg: Any) extends Product with Serializable
- final case class Passthrough(msg: Any) extends CircuitBreakerCommand with Product with Serializable
- final case class TellOnly(msg: Any) extends CircuitBreakerCommand with Product with Serializable
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
props(target: ActorRef, maxFailures: Int, callTimeout: Timeout, resetTimeout: Timeout, circuitEventListener: Option[ActorRef], failureDetector: (Any) ⇒ Boolean, failureMap: (CircuitOpenFailure) ⇒ Any): Props
Creates an circuit breaker actor proxying a target actor intended for request-reply interactions.
Creates an circuit breaker actor proxying a target actor intended for request-reply interactions. It is possible to send messages through this proxy without expecting a response wrapping them into a akka.contrib.circuitbreaker.CircuitBreakerProxy.TellOnly or a akka.contrib.circuitbreaker.CircuitBreakerProxy.Passthrough the difference between the two being that a message wrapped into a akka.contrib.circuitbreaker.CircuitBreakerProxy.Passthrough is going to be forwarded even when the circuit is open (e.g. if you need to terminate the target and proxy actors sending a akka.actor.PoisonPill message)
The circuit breaker implements the same state machine documented in akka.pattern.CircuitBreaker
- target
the actor to proxy
- maxFailures
maximum number of failures before opening the circuit
- callTimeout
timeout before considering the ongoing call a failure
- resetTimeout
time after which the channel will be closed after entering the open state
- circuitEventListener
an actor that will receive a series of messages of type akka.contrib.circuitbreaker.CircuitBreakerProxy.CircuitBreakerEvent (optional)
- failureDetector
function to detect if a message received from the target actor as a response from the request represents a failure
- failureMap
function to map a failure into a response message. The failing response message is wrapped into a akka.contrib.circuitbreaker.CircuitBreakerProxy.CircuitOpenFailure object
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- object Closed extends CircuitBreakerState with Product with Serializable
- object HalfOpen extends CircuitBreakerState with Product with Serializable
- object Open extends CircuitBreakerState with Product with Serializable