|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.jeri.internal.runtime.ImplRefManager
final class ImplRefManager
Manages references to remote object implementations (impls) used by ObjectTable targets. The managed reference for a particular impl is represented by an instance of the inner class ImplRef. All of the targets for current exports of an impl are registered with its ImplRef. This class supports pinning and unpinning of an impl reference by its registered targets (to control whether the reference is strong or weak); automatic, asynchronous invocation of an impl's Unreferenced.unreferenced() method, when appropriate; and asynchronous notifications of all registered targets when a (weakly referenced) impl has been garbage collected.
Nested Class Summary | |
---|---|
(package private) class |
ImplRefManager.ImplRef
A managed reference to a remote object implementation (impl). |
private class |
ImplRefManager.Reaper
Waits for notifications that weak references in the table have been cleared (and thus referenced impls have been garbage collected). |
Field Summary | |
---|---|
private boolean |
interruptible
true if reaper thread may be interrupted |
private Object |
lock
lock guarding all mutable instance state (below). |
private static Logger |
logger
|
private Thread |
reaper
thread to process garbage collected impls |
private ReferenceQueue |
reapQueue
queue notified when weak refs to impls are cleared |
private Map<Reference,ImplRefManager.ImplRef> |
weakImplTable
maps WeakKey(impl) to ImplRef(WeakKey(impl)) |
Constructor Summary | |
---|---|
ImplRefManager()
|
Method Summary | |
---|---|
(package private) ImplRefManager.ImplRef |
getImplRef(Remote impl,
Target target)
Returns the ImplRef for the specified impl (creating it if necessary), registering the supplied target with it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final Logger logger
private final ReferenceQueue reapQueue
private final Object lock
private final Map<Reference,ImplRefManager.ImplRef> weakImplTable
private Thread reaper
private boolean interruptible
Constructor Detail |
---|
ImplRefManager()
Method Detail |
---|
ImplRefManager.ImplRef getImplRef(Remote impl, Target target)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |