| Modifier and Type | Class and Description |
|---|---|
| private static class | ObjectTable.
The Reaper thread waits for notifications that weak references in the object table have been cleared. |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | gcInterval
maximum interval between complete garbage collections of local heap |
| private static GC. | gcLatencyRequest
handle for GC latency request (for future cancellation) |
| private static final Map | |
| private static int | keepAliveCount
count of non-permanent objects in table or still processing calls |
| private static final Object | keepAliveLock
lock guarding keepAliveCount, reaper, and gcLatencyRequest. |
| private static final Map | objTable
tables mapping to Target, keyed from ObjectEndpoint and impl object |
| private static Thread | reaper
thread to collect unreferenced objects from table |
| pack-priv static final ReferenceQueue | reapQueue
queue notified when weak refs in the table are cleared |
| private static final Object | tableLock
lock guarding objTable and implTable. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static void | |
| public static Remote | |
| pack-priv static Target | |
| public static Target | |
| pack-priv static void | |
| pack-priv static void | |
| pack-priv static void | referenced(ObjID id, long sequenceNum, VMID vmid)
Process client VM signalling reference for given ObjID: forward to corresponding Target entry. |
| private static void | |
| public static boolean | Returns: true if operation is successful, false otherwisethe remote object to be unexported obj, boolean if true, unexports the object even if there are
pending or in-progress calls; if false, only unexports the object
if there are no pending or in-progress calls force)Remove the remote object, obj, from the RMI runtime. |
| pack-priv static void | unreferenced(ObjID id, long sequenceNum, VMID vmid, boolean strong)
Process client VM dropping reference for given ObjID: forward to corresponding Target entry. |
| gcInterval | back to summary |
|---|---|
| private static final long gcInterval maximum interval between complete garbage collections of local heap | |
| gcLatencyRequest | back to summary |
|---|---|
| private static GC. handle for GC latency request (for future cancellation) | |
| implTable | back to summary |
|---|---|
| private static final Map<WeakRef, Target> implTable | |
| keepAliveCount | back to summary |
|---|---|
| private static int keepAliveCount count of non-permanent objects in table or still processing calls | |
| keepAliveLock | back to summary |
|---|---|
| private static final Object keepAliveLock lock guarding keepAliveCount, reaper, and gcLatencyRequest. Holders may NOT acquire a Target instance's lock or tableLock. | |
| objTable | back to summary |
|---|---|
| private static final Map<ObjectEndpoint, Target> objTable tables mapping to Target, keyed from ObjectEndpoint and impl object | |
| reaper | back to summary |
|---|---|
| private static Thread reaper thread to collect unreferenced objects from table | |
| reapQueue | back to summary |
|---|---|
| pack-priv static final ReferenceQueue<Object> reapQueue queue notified when weak refs in the table are cleared | |
| tableLock | back to summary |
|---|---|
| private static final Object tableLock lock guarding objTable and implTable. Holders MAY acquire a Target instance's lock or keepAliveLock. | |
| ObjectTable | back to summary |
|---|---|
| private ObjectTable() | |
| decrementKeepAliveCount | back to summary |
|---|---|
| pack-priv static void decrementKeepAliveCount() Decrements the "keep-alive count". The "keep-alive count" is the number of non-permanent remote objects that are either in the object table or still have calls in progress. Therefore, this method should be invoked exactly once for every previously-exported non-permanent remote object that both has been removed from the object table and has no calls still in progress. If the keep-alive count is decremented to zero, then the current reaper thread is terminated to cease keeping the VM alive (and because there are no more non-permanent remote objects to reap). | |
| getStub | back to summary |
|---|---|
| public static Remote getStub(Remote impl) throws NoSuchObjectException Returns the stub for the remote object obj passed as a parameter. This operation is only valid after the object has been exported.
| |
| getTarget | back to summary |
|---|---|
| pack-priv static Target getTarget(ObjectEndpoint oe) Returns the target associated with the object id. | |
| getTarget | back to summary |
|---|---|
| public static Target getTarget(Remote impl) Returns the target associated with the remote object | |
| incrementKeepAliveCount | back to summary |
|---|---|
| pack-priv static void incrementKeepAliveCount() Increments the "keep-alive count". The "keep-alive count" is the number of non-permanent remote objects that are either in the object table or still have calls in progress. Therefore, this method should be invoked exactly once for every non-permanent remote object exported (a remote object must be exported before it can have any calls in progress). The VM is "kept alive" while the keep-alive count is greater than zero; this is accomplished by keeping a non-daemon thread running. Because non-permanent objects are those that can be garbage collected while exported, and thus those for which the "reaper" thread operates, the reaper thread also serves as the non-daemon VM keep-alive thread; a new reaper thread is created if necessary. | |
| putTarget | back to summary |
|---|---|
| pack-priv static void putTarget(Target target) throws ExportException Add target to object table. If it is not a permanent entry, then make sure that reaper thread is running to remove collected entries and keep VM alive. | |
| referenced | back to summary |
|---|---|
| pack-priv static void referenced(ObjID id, long sequenceNum, VMID vmid) Process client VM signalling reference for given ObjID: forward to corresponding Target entry. If ObjID is not found in table, no action is taken. | |
| removeTarget | back to summary |
|---|---|
| private static void removeTarget(Target target) Remove target from object table. Note This method must only be invoked while synchronized on the "tableLock" object, because it does not do so itself. | |
| unexportObject | back to summary |
|---|---|
| public static boolean unexportObject(Remote obj, boolean force) throws NoSuchObjectException Remove the remote object, obj, from the RMI runtime. If successful, the object can no longer accept incoming RMI calls. If the force parameter is true, the object is forcibly unexported even if there are pending calls to the remote object or the remote object still has calls in progress. If the force parameter is false, the object is only unexported if there are no pending or in progress calls to the object.
| |
| unreferenced | back to summary |
|---|---|
| pack-priv static void unreferenced(ObjID id, long sequenceNum, VMID vmid, boolean strong) Process client VM dropping reference for given ObjID: forward to corresponding Target entry. If ObjID is not found in table, no action is taken. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| Reaper | back to summary |
|---|---|
| private Reaper() | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |