As mentioned before, only universal actors can migrate. Sending the message migrate(<ual>) to an universal actor causes it to migrate seamlessly to the designated location. Its UAL will be changed and the naming service will be notified to update its entry.
The following example defines the behavior MigrateSelf, that migrates the MigrateSelf actor to location UAL1 and then to UAL2. The migrate message takes as argument a string specifying the target UAL or it can take the object new UAL("UAL string").
module examples; |