pekko/akka-docs/project/migration-guide-0.7.x-0.8.x.rst
Patrik Nordwall a597915993 Docs: Restructured toc
(cherry picked from commit b6ea22e994ab900dad2661861cd90a7ab969ceb4)
2011-05-06 10:12:16 +02:00

94 lines
2.4 KiB
ReStructuredText

Migration Guide 0.7.x to 0.8.x
==============================
This is a case-by-case migration guide from Akka 0.7.x (on Scala 2.7.7) to Akka 0.8.x (on Scala 2.8.x)
------------------------------------------------------------------------------------------------------
Cases:
------
Actor.send is removed and replaced in full with Actor.!
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: scala
myActor send "test"
becomes
.. code-block:: scala
myActor ! "test"
Actor.! now has it's implicit sender defaulted to None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: scala
def !(message: Any)(implicit sender: Option[Actor] = None)
"import Actor.Sender.Self" has been removed because it's not needed anymore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Remove
.. code-block:: scala
import Actor.Sender.Self
Actor.spawn now uses manifests instead of concrete class types
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: scala
val someActor = spawn(classOf[MyActor])
becomes
.. code-block:: scala
val someActor = spawn[MyActor]
Actor.spawnRemote now uses manifests instead of concrete class types
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: scala
val someActor = spawnRemote(classOf[MyActor],"somehost",1337)
becomes
.. code-block:: scala
val someActor = spawnRemote[MyActor]("somehost",1337)
Actor.spawnLink now uses manifests instead of concrete class types
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: scala
val someActor = spawnLink(classOf[MyActor])
becomes
.. code-block:: scala
val someActor = spawnLink[MyActor]
Actor.spawnLinkRemote now uses manifests instead of concrete class types
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: scala
val someActor = spawnLinkRemote(classOf[MyActor],"somehost",1337)
becomes
.. code-block:: scala
val someActor = spawnLinkRemote[MyActor]("somehost",1337)
**Transaction.atomic and friends are moved into Transaction.Local._ and Transaction.Global._**
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We now make a difference between transaction management that are local within a thread and global across many threads (and actors).