O'Reilly logo

Akka Concurrency by Derek Wyatt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9

Being Stateful

If you're a coffee drinker, then it's quite possible that you have a very personal understanding of behavioural state. I once dated a woman whose mother was the most serious caffeine addict I'd ever seen. Every trip in the car required a set of scheduled stops to Canada's staple coffee shop, so she could load up on an extra-large double-double. Failure to do so resulted in a state that was...well, that woman and I didn't go out for very long.

From an actor perspective, if my friend's mother didn't receive a Coffee message on a regular basis, she would become(intolerable). Akka allows you to change an actor's running behavioural state during message processing, which can change the way your actor reacts to future messages ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required