akka.transactor

Coordination

object Coordination extends AnyRef

Coordinating transactions between typed actors.

Example (in Scala)

trait Counter {
  @Coordinated def increment: Unit
  def get: Int
}

class CounterImpl extends TypedActor with Counter {
  val ref = Ref(0)
  def increment = ref alter (_ + 1)
  def get = ref.get
}


val counter1 = TypedActor.newInstance(classOf[Counter], classOf[CounterImpl])
val counter2 = TypedActor.newInstance(classOf[Counter], classOf[CounterImpl])

coordinate {
  counter1.increment
  counter2.increment
}
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. Coordination
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  7. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def coordinate [U] (wait: Boolean, atomic: Atomic[U]): Unit

    Java API: coordinate that accepts an Atomic.

    Java API: coordinate that accepts an Atomic. For creating a coordination between typed actors that use the Coordinated annotation. Coordinated transactions will wait for all other transactions in the coordination before committing. The timeout is specified by the default transaction factory. Use the wait parameter to specify whether or not this coordinate block waits for all of the transactions to complete.

  9. def coordinate (wait: Boolean, atomically: Atomically): Unit

    Java API: coordinate that accepts an Atomically.

    Java API: coordinate that accepts an Atomically. For creating a coordination between typed actors that use the Coordinated annotation. Coordinated transactions will wait for all other transactions in the coordination before committing. The timeout is specified by the default transaction factory. Use the wait parameter to specify whether or not this coordinate block waits for all of the transactions to complete.

  10. def coordinate [U] (body: ⇒ U): Unit

    For creating a coordination between typed actors that use the Coordinated annotation.

    For creating a coordination between typed actors that use the Coordinated annotation. Coordinated transactions will wait for all other transactions in the coordination before committing. The timeout is specified by the default transaction factory.

  11. def coordinate [U] (wait: Boolean = true)(body: ⇒ U): Unit

    For creating a coordination between typed actors that use the Coordinated annotation.

    For creating a coordination between typed actors that use the Coordinated annotation. Coordinated transactions will wait for all other transactions in the coordination before committing. The timeout is specified by the default transaction factory. It's possible to specify whether or not this coordinate block waits for all of the transactions to complete - the default is that it does.

  12. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  13. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  15. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  16. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  17. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  18. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  19. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  20. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  21. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  22. def toString (): String

    Definition Classes
    AnyRef → Any
  23. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  24. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  25. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any