public class JvmLifeSupport
extends Object
This class maintains a thread if necessary, in the wait state, to prevent
the jvm shutting down while remote objects hold strong references in the
DGC.
This implementation is more about scalability than performance, when a jvm
only has a small number of remote objects exported, blocking is not likely
to cause a performance problem, access to keepAliveCount blocked.
However with very large numbers of remote objects exported, in a dynamic
environment, blocking is unlikely to be an issue, in this case the read locks
will remain uncontended as the blocking write lock is only required as
the number of exported object approach zero.
If the thread is interrupted, it will pass away, regardless of the number of
objects exported.
- Since:
- 2.2.0
- Author:
- Peter Firmstone