wiki:JavaParty/ObjectMigration

Object Migration

Remote objects can migrate to another node at runtime. Old references to them keep working. E.g. use the following call to migrate remote object obj to node n:

boolean success = jp.lang.DistributedRuntime.migrate(obj, n);

Please also have a look at the JavaParty API documentation.

All remote objects can migrate, except those with methods that are currently being executed, and those whose classes are declared resident. A class is declared resident by implementing the interface jp.lang.Resident. In the following code example, class R is declared resident:

remote class R implements jp.lang.Resident {
   ...
}

As you would expect form interface inheritance, the resident property is inherited by all subclasses and can not be revoked.

Migration enabling an object has some overhead for each method call on that object. Declaring classes resident which objects need no migration can safes this overhead and increase the performance of your application.

Last modified 11 years ago Last modified on Jan 17, 2007 10:52:54 AM