resynchObject

resynchObject(object: Object);

The resynchObject method of the Object class enables you to mark as obsolete the transient replica of the object specified in the object parameter.

This causes the latest edition of the specified object to be fetched from the server the next time that object is required.

It is preferable to use another object that already exists in cache to resynchronize the target object (for example, resynchObject(myObj); uses the current receiver of your method). When a resynchronization is performed on an object that is currently the receiver of an executing method, the operation is performed after the executing method has finished.

The object is not copied from the server if the obsolete buffer in your local cache on the client is the same edition as that on the server, but the buffer is marked as no longer obsolete when you next reference the object.

When automatic cache coherency is enabled (by setting the AutomaticCacheCoherency parameter in the [JadeClient] section of the JADE initialization file to true), calling the Object class resynchObject method has no effect. With automatic cache coherency, an object updated on another node is automatically reloaded in cache, even when it is the receiver of a method currently being executed.

See also the Object class edition and latestEdition methods, and "Using Object Editions" under "Unlocking Objects", in Chapter 6 of the JADE Developer’s Reference.