Merge branch 'ActorRef-FaultTolerance' of git@github.com:jboner/akka into ActorRef-FaultTolerance
Conflicts: akka-core/src/main/scala/actor/ActiveObject.scala akka-core/src/main/scala/actor/Actor.scala akka-core/src/main/scala/actor/Agent.scala
This commit is contained in:
commit
b9d2c1380f
2 changed files with 13 additions and 4 deletions
|
|
@ -731,6 +731,8 @@ sealed class ActorRef private[akka] () extends TransactionManagement {
|
|||
} finally {
|
||||
link(actor)
|
||||
}
|
||||
actor._selfOption = Some(this)
|
||||
if (actor eq null) throw new ActorInitializationException("Actor instance passed to ActorRef can not be 'null'")
|
||||
actor
|
||||
}
|
||||
|
||||
|
|
@ -747,7 +749,6 @@ sealed class ActorRef private[akka] () extends TransactionManagement {
|
|||
} finally {
|
||||
link(actor)
|
||||
}
|
||||
actor
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -1468,8 +1469,16 @@ object DispatcherType {
|
|||
}
|
||||
|
||||
/**
|
||||
* For internal use only.
|
||||
*
|
||||
* Actor base trait that should be extended by or mixed to create an Actor with the semantics of the 'Actor Model':
|
||||
* <a href="http://en.wikipedia.org/wiki/Actor_model">http://en.wikipedia.org/wiki/Actor_model</a>
|
||||
* <p/>
|
||||
* An actor has a well-defined (non-cyclic) life-cycle.
|
||||
* <pre>
|
||||
* => NEW (newly created actor) - can't receive messages (yet)
|
||||
* => STARTED (when 'start' is invoked) - can receive messages
|
||||
* => SHUT DOWN (when 'exit' is invoked) - can't do anything
|
||||
* </pre>
|
||||
*
|
||||
* @author <a href="http://jonasboner.com">Jonas Bonér</a>
|
||||
*/
|
||||
class ActorMessageInvoker private[akka] (val actorRef: ActorRef) extends MessageInvoker {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ trait Dispatcher { this: Actor =>
|
|||
|
||||
protected def dispatch: PartialFunction[Any, Unit] = {
|
||||
case a if routes.isDefinedAt(a) =>
|
||||
if (self.replyTo.isDefined) routes(a) forward transform(a)
|
||||
if (self.self.replyTo.isDefined) routes(a).forward(transform(a))(Some(self.self))
|
||||
else routes(a).!(transform(a))(None)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue