Moved decider to separate parameter list, and implicit conversion from Seq[Throwable]. See #1714

This commit is contained in:
Patrik Nordwall 2012-01-24 10:35:09 +01:00
parent abc072ef0a
commit 2a6b7f9b03
22 changed files with 142 additions and 144 deletions

View file

@ -22,12 +22,12 @@ object FaultHandlingDocSpec {
import akka.actor.SupervisorStrategy._
import akka.util.duration._
override val supervisorStrategy = OneForOneStrategy({
override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange = 1 minute) {
case _: ArithmeticException Resume
case _: NullPointerException Restart
case _: IllegalArgumentException Stop
case _: Exception Escalate
}: Decider, maxNrOfRetries = 10, withinTimeRange = 1 minute)
}
//#strategy
def receive = {
@ -43,12 +43,12 @@ object FaultHandlingDocSpec {
import akka.actor.SupervisorStrategy._
import akka.util.duration._
override val supervisorStrategy = OneForOneStrategy({
override val supervisorStrategy = OneForOneStrategy(maxNrOfRetries = 10, withinTimeRange = 1 minute) {
case _: ArithmeticException Resume
case _: NullPointerException Restart
case _: IllegalArgumentException Stop
case _: Exception Escalate
}: Decider, maxNrOfRetries = 10, withinTimeRange = 1 minute)
}
//#strategy2
def receive = {