Remove SelfActorRef and use ActorContext to access state in ActorInstance. See #1202
- removed SelfActorRef - added an ActorContext interface that provides a view into ActorInstance - the ActorInstance (as ActorContext) gets injected into the Actor - moved self methods like sender and reply directly to the Actor
This commit is contained in:
parent
d926b05fae
commit
7b1cdb4457
96 changed files with 476 additions and 542 deletions
|
|
@ -129,13 +129,13 @@ object ActorSerialization {
|
|||
}
|
||||
}
|
||||
|
||||
l.receiveTimeout.foreach(builder.setReceiveTimeout(_))
|
||||
l.underlying.receiveTimeout.foreach(builder.setReceiveTimeout(_))
|
||||
val actorInstance = l.underlyingActorInstance
|
||||
Serialization.serialize(actorInstance.asInstanceOf[T]) match {
|
||||
case Right(bytes) ⇒ builder.setActorInstance(ByteString.copyFrom(bytes))
|
||||
case Left(exception) ⇒ throw new Exception("Error serializing : " + actorInstance.getClass.getName)
|
||||
}
|
||||
val stack = l.hotswap
|
||||
val stack = l.underlying.hotswap
|
||||
if (!stack.isEmpty)
|
||||
builder.setHotswapStack(ByteString.copyFrom(akka.serialization.JavaSerializer.toBinary(stack)))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue