O'Reilly logo

Programming Concurrency on the JVM by Venkat Subramaniam

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

Using Transactors

Akka transactors or transactional actors bring execution of multiple actors into the folds of a transaction. Transactors make atomic the changes to managed STM Ref objects from multiple coordinating actors. The changes to these objects are retained only if the encompassing transaction commits; otherwise, the changes are discarded.

Transactors provide three options to process messages:

  • The default option is to process a message in its own transaction.

  • We can implement a normally method that can process select messages stand-alone, that is, not as part of any transaction.

  • We can ask for messages to be processed Coordinated, that is, as part of an overarching transaction.

Transactors provide us with the flexibility to link ...

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