Want to restart actor after exception with previous state by supervisor strategies.
For example
Actor supervisor saves some parameter from his children. Also supervisor has next strategy:
override val supervisorStrategy =
OneForOneStrategy(maxNrOfRetries = 10) {
case e : ActorKilledException => {
log.info("Restart === " + e)
Restart
//TODO HOW TO SEND SOME PARAMETER TO THE ACTOR, AFTER RESTART ?
}
case _: Exception => Escalate
}
How can I set previous parameter of actor "before crash" by supervisorStrategy. ?
I could not find it by http://doc.akka.io/docs/akka/2.4.2/general/supervision.html
Any links, examples ?
Thanks!