Additional top-level class in compilation unit: SequenceEntry.
| Modifier and Type | Field and Description |
|---|---|
| private int | callCount
number of pending/executing calls |
| private final ClassLoader | ccl
context class loader in which target was created |
| private volatile Dispatcher | disp
dispatcher for remote object |
| private volatile Transport | exportedTransport
the transport through which this target was exported and through which remote calls will be allowed |
| private final ObjID | id
object id for target |
| private static int | nextThreadNum
number to identify next callback thread created here |
| private final boolean | permanent
flag indicating whether target is subject to collection |
| private final Vector | refSet
set of clients that hold references to this target |
| private boolean | removed
true if this target has been removed from the object table |
| private final Hashtable | sequenceTable
table that maps client endpoints to sequence numbers |
| private final Remote | stub
stub for remote object |
| private final WeakRef | weakImpl
weak reference to remote object implementation |
| Access | Constructor and Description |
|---|---|
| public | Target(Remote impl, Dispatcher disp, Remote stub, ObjID id, boolean permanent)
Construct a Target for a remote object "impl" with a specific object id. If "permanent" is true, then the impl is pinned permanently (the impl will not be collected via distributed and/or local GC). |
| Modifier and Type | Method and Description |
|---|---|
| private static boolean | checkLoaderAncestry(ClassLoader child, ClassLoader ancestor)
Return true if the first class loader is a child of (or identical to) the second class loader. |
| pack-priv synchronized void | |
| pack-priv ClassLoader | |
| pack-priv Dispatcher | |
| pack-priv Remote | |
| pack-priv ObjectEndpoint | |
| public Remote | |
| pack-priv WeakRef | |
| pack-priv synchronized void | |
| pack-priv boolean | |
| pack-priv boolean | |
| pack-priv synchronized void | |
| pack-priv synchronized void | |
| pack-priv synchronized void | |
| private synchronized void | |
| pack-priv void | setExportedTransport(Transport exportedTransport)
Enable the transport through which remote calls to this target are allowed to be set if it has not already been set. |
| pack-priv synchronized boolean | unexport(boolean force)
Mark this target as not accepting new calls if any of the following conditions exist: a) the force parameter is true, b) the target's call count is zero, or c) the object is already not accepting calls. |
| pack-priv synchronized void | |
| pack-priv synchronized void | |
| public synchronized void |
| callCount | back to summary |
|---|---|
| private int callCount number of pending/executing calls | |
| ccl | back to summary |
|---|---|
| private final ClassLoader ccl context class loader in which target was created | |
| disp | back to summary |
|---|---|
| private volatile Dispatcher disp dispatcher for remote object | |
| exportedTransport | back to summary |
|---|---|
| private volatile Transport exportedTransport the transport through which this target was exported and through which remote calls will be allowed | |
| id | back to summary |
|---|---|
| private final ObjID id object id for target | |
| nextThreadNum | back to summary |
|---|---|
| private static int nextThreadNum number to identify next callback thread created here | |
| permanent | back to summary |
|---|---|
| private final boolean permanent flag indicating whether target is subject to collection | |
| refSet | back to summary |
|---|---|
| private final Vector<VMID> refSet set of clients that hold references to this target | |
| removed | back to summary |
|---|---|
| private boolean removed true if this target has been removed from the object table | |
| sequenceTable | back to summary |
|---|---|
| private final Hashtable<VMID, SequenceEntry> sequenceTable table that maps client endpoints to sequence numbers | |
| stub | back to summary |
|---|---|
| private final Remote stub stub for remote object | |
| weakImpl | back to summary |
|---|---|
| private final WeakRef weakImpl weak reference to remote object implementation | |
| Target | back to summary |
|---|---|
| public Target(Remote impl, Dispatcher disp, Remote stub, ObjID id, boolean permanent) Construct a Target for a remote object "impl" with a specific object id. If "permanent" is true, then the impl is pinned permanently (the impl will not be collected via distributed and/or local GC). If "on" is false, than the impl is subject to collection. Permanent objects do not keep a server from exiting. | |
| checkLoaderAncestry | back to summary |
|---|---|
| private static boolean checkLoaderAncestry(ClassLoader child, ClassLoader ancestor) Return true if the first class loader is a child of (or identical to) the second class loader. Either loader may be "null", which is considered to be the parent of any non-null class loader. (utility method added for the 1.2beta4 fix for 4149366) | |
| decrementCallCount | back to summary |
|---|---|
| pack-priv synchronized void decrementCallCount() Decrement call count. | |
| getContextClassLoader | back to summary |
|---|---|
| pack-priv ClassLoader getContextClassLoader() | |
| getDispatcher | back to summary |
|---|---|
| pack-priv Dispatcher getDispatcher() Returns the dispatcher for this remote object target. | |
| getImpl | back to summary |
|---|---|
| pack-priv Remote getImpl() Get the impl for this target. Note this may return null if the impl has been garbage collected. (currently, there is no need to make this method public) | |
| getObjectEndpoint | back to summary |
|---|---|
| pack-priv ObjectEndpoint getObjectEndpoint() Returns the object endpoint for the target. | |
| getStub | back to summary |
|---|---|
| public Remote getStub() Get the stub (proxy) object for this target | |
| getWeakImpl | back to summary |
|---|---|
| pack-priv WeakRef getWeakImpl() Get the weak reference for the Impl of this target. | |
| incrementCallCount | back to summary |
|---|---|
| pack-priv synchronized void incrementCallCount() throws NoSuchObjectException Increment call count. | |
| isEmpty | back to summary |
|---|---|
| pack-priv boolean isEmpty() Returns true if remembered set is empty; otherwise returns false | |
| isPermanent | back to summary |
|---|---|
| pack-priv boolean isPermanent() Returns true if the target is permanent. | |
| markRemoved | back to summary |
|---|---|
| pack-priv synchronized void markRemoved() Mark this target as having been removed from the object table. | |
| pinImpl | back to summary |
|---|---|
| pack-priv synchronized void pinImpl() Pin impl in target. Pin the WeakRef object so it holds a strong reference to the object to it will not be garbage collected locally. This way there is a single object responsible for the weak ref mechanism. | |
| referenced | back to summary |
|---|---|
| pack-priv synchronized void referenced(long sequenceNum, VMID vmid) Add an endpoint to the remembered set. Also adds a notifier to call back if the address space associated with the endpoint dies. | |
| refSetRemove | back to summary |
|---|---|
| private synchronized void refSetRemove(VMID vmid) Remove endpoint from the reference set. | |
| setExportedTransport | back to summary |
|---|---|
| pack-priv void setExportedTransport(Transport exportedTransport) Enable the transport through which remote calls to this target are allowed to be set if it has not already been set. | |
| unexport | back to summary |
|---|---|
| pack-priv synchronized boolean unexport(boolean force) Mark this target as not accepting new calls if any of the following conditions exist: a) the force parameter is true, b) the target's call count is zero, or c) the object is already not accepting calls. Returns true if target is marked as not accepting new calls; returns false otherwise. | |
| unpinImpl | back to summary |
|---|---|
| pack-priv synchronized void unpinImpl() Unpin impl in target. Weaken the reference to impl so that it can be garbage collected locally. But only if there the refSet is empty. All of the weak/strong handling is in WeakRef | |
| unreferenced | back to summary |
|---|---|
| pack-priv synchronized void unreferenced(long sequenceNum, VMID vmid, boolean strong) Remove endpoint from remembered set. If set becomes empty, remove server from Transport's object table. | |
| vmidDead | back to summary |
|---|---|
| public synchronized void vmidDead(VMID vmid) This method is called if the address space associated with the vmid dies. In that case, the vmid should be removed from the reference set. | |