akka.transactor
Class UntypedTransactor

java.lang.Object
  extended by akka.actor.UntypedActor
      extended by akka.transactor.UntypedTransactor
All Implemented Interfaces:
Actor

public abstract class UntypedTransactor
extends UntypedActor

An UntypedActor version of transactor for using from Java.


Nested Class Summary
 
Nested classes/interfaces inherited from interface akka.actor.Actor
Actor.emptyBehavior$
 
Constructor Summary
UntypedTransactor()
           
 
Method Summary
 void after(java.lang.Object message)
          A Receive block that runs after the coordinated transaction.
abstract  void atomically(java.lang.Object message)
          The Receive block to run inside the coordinated transaction.
 void before(java.lang.Object message)
          A Receive block that runs before the coordinated transaction is entered.
 java.util.Set<SendTo> coordinate(java.lang.Object message)
          Override this method to coordinate with other transactors.
 java.util.Set<SendTo> include(ActorRef actor)
          For including one other actor in this coordinated transaction and sending them the same message as received.
 java.util.Set<SendTo> include(ActorRef actor, java.lang.Object message)
          For including one other actor in this coordinated transaction and specifying the message to send.
 java.util.Set<SendTo> nobody()
          Empty set of transactors to send to.
 boolean normally(java.lang.Object message)
          Bypass transactionality and behave like a normal actor.
 void onReceive(java.lang.Object message)
          Implement a general pattern for using coordinated transactions.
 SendTo sendTo(ActorRef actor)
          For including another actor in this coordinated transaction and sending them the same message as received.
 SendTo sendTo(ActorRef actor, java.lang.Object message)
          For including another actor in this coordinated transaction and specifying the message to send.
 
Methods inherited from class akka.actor.UntypedActor
getContext, getSelf, getSender, postRestart, postStop, preRestart, preStart, receive, supervisorStrategy, unhandled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface akka.actor.Actor
aroundPostRestart, aroundPostStop, aroundPreRestart, aroundPreStart, aroundReceive, context, self, sender
 

Constructor Detail

UntypedTransactor

public UntypedTransactor()
Method Detail

onReceive

public final void onReceive(java.lang.Object message)
Implement a general pattern for using coordinated transactions.

Specified by:
onReceive in class UntypedActor
Parameters:
message - (undocumented)

coordinate

public java.util.Set<SendTo> coordinate(java.lang.Object message)
Override this method to coordinate with other transactors. The other transactors are added to the coordinated transaction barrier and sent a Coordinated message. The message to send can be specified or otherwise the same message as received is sent. Use the 'include' and 'sendTo' methods to easily create the set of transactors to be involved.

Parameters:
message - (undocumented)
Returns:
(undocumented)

nobody

public java.util.Set<SendTo> nobody()
Empty set of transactors to send to.

Returns:
(undocumented)

include

public java.util.Set<SendTo> include(ActorRef actor)
For including one other actor in this coordinated transaction and sending them the same message as received. Use as the result in coordinated.

Parameters:
actor - (undocumented)
Returns:
(undocumented)

include

public java.util.Set<SendTo> include(ActorRef actor,
                                     java.lang.Object message)
For including one other actor in this coordinated transaction and specifying the message to send. Use as the result in coordinated.

Parameters:
actor - (undocumented)
message - (undocumented)
Returns:
(undocumented)

sendTo

public SendTo sendTo(ActorRef actor)
For including another actor in this coordinated transaction and sending them the same message as received. Use to create the result in coordinated.

Parameters:
actor - (undocumented)
Returns:
(undocumented)

sendTo

public SendTo sendTo(ActorRef actor,
                     java.lang.Object message)
For including another actor in this coordinated transaction and specifying the message to send. Use to create the result in coordinated.

Parameters:
actor - (undocumented)
message - (undocumented)
Returns:
(undocumented)

before

public void before(java.lang.Object message)
A Receive block that runs before the coordinated transaction is entered.

Parameters:
message - (undocumented)

atomically

public abstract void atomically(java.lang.Object message)
The Receive block to run inside the coordinated transaction.

Parameters:
message - (undocumented)

after

public void after(java.lang.Object message)
A Receive block that runs after the coordinated transaction.

Parameters:
message - (undocumented)

normally

public boolean normally(java.lang.Object message)
Bypass transactionality and behave like a normal actor.

Parameters:
message - (undocumented)
Returns:
(undocumented)