Name
Unreferenced
Synopsis
If a server object implements this interface, then the unreferenced()
method is called by the RMI runtime when the last client reference to
a remote object is dropped. A remote object shouldn’t be garbage
collected until all of its remote and local references are gone. So
the unreferenced()
method isn’t a trigger for an object to be
finalized, but rather a chance for the remote object to respond
appropriately when its client reference count goes to zero. The
unreferenced object could, for example, start a timer countdown to
move the object to persistent storage after a given idle time with
respect to remote clients.
public interface Unreferenced { // Public Instance Methods public abstract void unreferenced(); }
Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.