sun.rmi.transport.DGCImpl
| Modifier and Type | Class and Description |
|---|---|
| private static class | DGCClient.
EndpointEntry encapsulates the client-side DGC information specific to a particular Endpoint. |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | cleanFailureRetries
retry count for clean calls that fail with ConnectException |
| private static final long | cleanInterval
maximum interval between retries of failed clean calls |
| private static final ObjID | dgcID
ObjID for server-side DGC object |
| private static final int | dirtyFailureRetries
minimum retry count for dirty calls that fail |
| private static final ObjID[] | emptyObjIDArray
constant empty ObjID array for lease renewal optimization |
| private static final long | gcInterval
maximum interval between complete garbage collections of local heap |
| private static final long | leaseValue
lease duration to request (usually ignored by server) |
| private static long | nextSequenceNum
next sequence number for DGC calls (access synchronized on class) |
| private static VMID | vmid
unique identifier for this VM as a client of DGC |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static long | computeRenewTime(long grantTime, long duration)
Given the length of a lease and the time that it was granted, compute the absolute time at which it should be renewed, giving room for reasonable computational and communication delays. |
| private static synchronized long | getNextSequenceNum()
Get the next sequence number to be used for a dirty or clean operation from this VM. |
| pack-priv static void | registerRefs(Endpoint ep, List<LiveRef> refs)
Register the LiveRef instances in the supplied list to participate in distributed garbage collection. |
| cleanFailureRetries | back to summary |
|---|---|
| private static final int cleanFailureRetries retry count for clean calls that fail with ConnectException | |
| cleanInterval | back to summary |
|---|---|
| private static final long cleanInterval maximum interval between retries of failed clean calls | |
| dgcID | back to summary |
|---|---|
| private static final ObjID dgcID ObjID for server-side DGC object | |
| dirtyFailureRetries | back to summary |
|---|---|
| private static final int dirtyFailureRetries minimum retry count for dirty calls that fail | |
| emptyObjIDArray | back to summary |
|---|---|
| private static final ObjID[] emptyObjIDArray constant empty ObjID array for lease renewal optimization | |
| gcInterval | back to summary |
|---|---|
| private static final long gcInterval maximum interval between complete garbage collections of local heap | |
| leaseValue | back to summary |
|---|---|
| private static final long leaseValue lease duration to request (usually ignored by server) | |
| nextSequenceNum | back to summary |
|---|---|
| private static long nextSequenceNum next sequence number for DGC calls (access synchronized on class) | |
| vmid | back to summary |
|---|---|
| private static VMID vmid unique identifier for this VM as a client of DGC | |
| DGCClient | back to summary |
|---|---|
| private DGCClient() | |
| computeRenewTime | back to summary |
|---|---|
| private static long computeRenewTime(long grantTime, long duration) Given the length of a lease and the time that it was granted, compute the absolute time at which it should be renewed, giving room for reasonable computational and communication delays. | |
| getNextSequenceNum | back to summary |
|---|---|
| private static synchronized long getNextSequenceNum() Get the next sequence number to be used for a dirty or clean operation from this VM. This method should only be called while synchronized on the EndpointEntry whose data structures the operation affects. | |
| registerRefs | back to summary |
|---|---|
| pack-priv static void registerRefs(Endpoint ep, List<LiveRef> refs) Register the LiveRef instances in the supplied list to participate in distributed garbage collection. All of the LiveRefs in the list must be for remote objects at the given endpoint. | |
| Modifier and Type | Class and Description |
|---|---|
| private static class | DGCClient.
CleanRequest holds the data for the parameters of a clean call that needs to be made. |
| private class | DGCClient.
RefEntry encapsulates the client-side DGC information specific to a particular LiveRef value. |
| private class | DGCClient.
RenewCleanThread handles the asynchronous client-side DGC activity for this entry: renewing the leases and making clean calls. |
| Modifier and Type | Field and Description |
|---|---|
| private DGC | dgc
synthesized reference to the remote server-side DGC |
| private long | dirtyFailureDuration
(average) elapsed time for recent failed dirty calls |
| private int | dirtyFailures
count of recent dirty calls that have failed |
| private long | dirtyFailureStartTime
absolute time of first recent failed dirty call |
| private Endpoint | endpoint
the endpoint that this entry is for |
| private static Map | endpointTable
global endpoint table: maps Endpoint to EndpointEntry |
| private long | expirationTime
absolute time current lease to this endpoint will expire |
| private static GC. | gcLatencyRequest
handle for GC latency request (for future cancellation) |
| private boolean | interruptible
true if renew/clean thread may be interrupted |
| private Set | invalidRefs
set of RefEntry instances from last (failed) dirty call |
| private Set | pendingCleans
set of clean calls that need to be made |
| private ReferenceQueue | refQueue
reference queue for phantom references |
| private Map | refTable
table of refs held for endpoint: maps LiveRef to RefEntry |
| private boolean | removed
true if this entry has been removed from the global table |
| private Thread | renewCleanThread
renew/clean thread for handling lease renewals and clean calls |
| private long | renewTime
absolute time to renew current lease to this endpoint |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static ObjID[] | createObjIDArray(Set<DGCClient.
Create an array of ObjIDs (needed for the DGC remote calls) from the ids in the given set of refs. |
| public static DGCClient. | |
| private void | makeCleanCalls()
Make all of the clean calls described by the clean requests in this entry's set of "pending cleans". |
| private void | makeDirtyCall(Set<DGCClient.
Make a DGC dirty call to this entry's endpoint, for the ObjIDs corresponding to the given set of refs and with the given sequence number. |
| private void | processPhantomRefs(DGCClient.
Process the notification of the given phantom reference and any others that are on this entry's reference queue. |
| public boolean | registerRefs(List<LiveRef> refs)
Register the LiveRef instances in the supplied list to participate in distributed garbage collection. |
| private void | removeRefEntry(DGCClient.
Remove the given RefEntry from the ref table. |
| private void | setRenewTime(long newRenewTime)
Set the absolute time at which the lease for this entry should be renewed. |
| dgc | back to summary |
|---|---|
| private DGC dgc synthesized reference to the remote server-side DGC | |
| dirtyFailureDuration | back to summary |
|---|---|
| private long dirtyFailureDuration (average) elapsed time for recent failed dirty calls | |
| dirtyFailures | back to summary |
|---|---|
| private int dirtyFailures count of recent dirty calls that have failed | |
| dirtyFailureStartTime | back to summary |
|---|---|
| private long dirtyFailureStartTime absolute time of first recent failed dirty call | |
| endpoint | back to summary |
|---|---|
| private Endpoint endpoint the endpoint that this entry is for | |
| endpointTable | back to summary |
|---|---|
| private static Map<Endpoint, DGCClient. global endpoint table: maps Endpoint to EndpointEntry | |
| expirationTime | back to summary |
|---|---|
| private long expirationTime absolute time current lease to this endpoint will expire | |
| gcLatencyRequest | back to summary |
|---|---|
| private static GC. handle for GC latency request (for future cancellation) | |
| interruptible | back to summary |
|---|---|
| private boolean interruptible true if renew/clean thread may be interrupted | |
| invalidRefs | back to summary |
|---|---|
| private Set<DGCClient. set of RefEntry instances from last (failed) dirty call | |
| pendingCleans | back to summary |
|---|---|
| private Set<DGCClient. set of clean calls that need to be made | |
| refQueue | back to summary |
|---|---|
| private ReferenceQueue<LiveRef> refQueue reference queue for phantom references | |
| refTable | back to summary |
|---|---|
| private Map<LiveRef, DGCClient. table of refs held for endpoint: maps LiveRef to RefEntry | |
| removed | back to summary |
|---|---|
| private boolean removed true if this entry has been removed from the global table | |
| renewCleanThread | back to summary |
|---|---|
| private Thread renewCleanThread renew/clean thread for handling lease renewals and clean calls | |
| renewTime | back to summary |
|---|---|
| private long renewTime absolute time to renew current lease to this endpoint | |
| EndpointEntry | back to summary |
|---|---|
| private EndpointEntry(final Endpoint endpoint) | |
| createObjIDArray | back to summary |
|---|---|
| private static ObjID[] createObjIDArray(Set<DGCClient. Create an array of ObjIDs (needed for the DGC remote calls) from the ids in the given set of refs. | |
| lookup | back to summary |
|---|---|
| public static DGCClient. Look up the EndpointEntry for the given Endpoint. An entry is created if one does not already exist. | |
| makeCleanCalls | back to summary |
|---|---|
| private void makeCleanCalls() Make all of the clean calls described by the clean requests in this entry's set of "pending cleans". Clean requests for clean calls that succeed are removed from the "pending cleans" set. This method must NOT be called while synchronized on this entry. | |
| makeDirtyCall | back to summary |
|---|---|
| private void makeDirtyCall(Set<DGCClient. Make a DGC dirty call to this entry's endpoint, for the ObjIDs corresponding to the given set of refs and with the given sequence number. This method must NOT be called while synchronized on this entry. | |
| processPhantomRefs | back to summary |
|---|---|
| private void processPhantomRefs(DGCClient. Process the notification of the given phantom reference and any others that are on this entry's reference queue. Each phantom reference is removed from its RefEntry's ref set. All ref entries that have no more registered instances are collected into up to two batched clean call requests: one for refs requiring a "strong" clean call, and one for the rest. This method must ONLY be called while synchronized on this entry. | |
| registerRefs | back to summary |
|---|---|
| public boolean registerRefs(List<LiveRef> refs) Register the LiveRef instances in the supplied list to participate in distributed garbage collection. This method returns false if this entry was removed from the global endpoint table (because it was empty) before these refs could be registered. In that case, a new EndpointEntry needs to be looked up. This method must NOT be called while synchronized on this entry. | |
| removeRefEntry | back to summary |
|---|---|
| private void removeRefEntry(DGCClient. Remove the given RefEntry from the ref table. If that makes the ref table empty, remove this entry from the global endpoint table. This method must ONLY be called while synchronized on this entry. | |
| setRenewTime | back to summary |
|---|---|
| private void setRenewTime(long newRenewTime) Set the absolute time at which the lease for this entry should be renewed. This method must ONLY be called while synchronized on this entry. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | failures
how many times this request has failed |
| pack-priv final ObjID[] | |
| pack-priv final long | |
| pack-priv final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| failures | back to summary |
|---|---|
| pack-priv int failures how many times this request has failed | |
| objIDs | back to summary |
|---|---|
| pack-priv final ObjID[] objIDs | |
| sequenceNum | back to summary |
|---|---|
| pack-priv final long sequenceNum | |
| strong | back to summary |
|---|---|
| pack-priv final boolean strong | |
| CleanRequest | back to summary |
|---|---|
| pack-priv CleanRequest(ObjID[] objIDs, long sequenceNum, boolean strong) | |
| Modifier and Type | Class and Description |
|---|---|
| private class | DGCClient.
PhantomLiveRef is a PhantomReference to a LiveRef instance, used to detect when the LiveRef becomes permanently unreachable in this VM. |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | dirtyFailed
true if a dirty call containing this ref has failed |
| private LiveRef | ref
LiveRef value for this entry (not a registered instance) |
| private Set | refSet
set of phantom references to registered instances |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public LiveRef | |
| public boolean | hasDirtyFailed()
Return true if a dirty call that explicitly contained this entry's ref has failed (and therefore a clean call for this ref needs to be marked "strong"). |
| public boolean | isRefSetEmpty()
Return true if there are no registered LiveRef instances for this entry still reachable in this VM. |
| public void | |
| public void | removeInstanceFromRefSet(DGCClient.
Remove a PhantomLiveRef from the set of registered instances. |
| dirtyFailed | back to summary |
|---|---|
| private boolean dirtyFailed true if a dirty call containing this ref has failed | |
| ref | back to summary |
|---|---|
| private LiveRef ref LiveRef value for this entry (not a registered instance) | |
| refSet | back to summary |
|---|---|
| private Set<DGCClient. set of phantom references to registered instances | |
| RefEntry | back to summary |
|---|---|
| public RefEntry(LiveRef ref) | |
| addInstanceToRefSet | back to summary |
|---|---|
| public void addInstanceToRefSet(LiveRef ref) Add a LiveRef to the set of registered instances for this entry. This method must ONLY be invoked while synchronized on this RefEntry's EndpointEntry. | |
| getRef | back to summary |
|---|---|
| public LiveRef getRef() Return the LiveRef value for this entry (not a registered instance). | |
| hasDirtyFailed | back to summary |
|---|---|
| public boolean hasDirtyFailed() Return true if a dirty call that explicitly contained this entry's ref has failed (and therefore a clean call for this ref needs to be marked "strong"). This method must ONLY be invoked while synchronized on this RefEntry's EndpointEntry. | |
| isRefSetEmpty | back to summary |
|---|---|
| public boolean isRefSetEmpty() Return true if there are no registered LiveRef instances for this entry still reachable in this VM. This method must ONLY be invoked while synchronized on this RefEntry's EndpointEntry. | |
| markDirtyFailed | back to summary |
|---|---|
| public void markDirtyFailed() Record that a dirty call that explicitly contained this entry's ref has failed. This method must ONLY be invoked while synchronized on this RefEntry's EndpointEntry. | |
| removeInstanceFromRefSet | back to summary |
|---|---|
| public void removeInstanceFromRefSet(DGCClient. Remove a PhantomLiveRef from the set of registered instances. This method must ONLY be invoked while synchronized on this RefEntry's EndpointEntry. | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public DGCClient. |
| PhantomLiveRef | back to summary |
|---|---|
| public PhantomLiveRef(LiveRef ref) | |
| getRefEntry | back to summary |
|---|---|
| public DGCClient. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| RenewCleanThread | back to summary |
|---|---|
| private RenewCleanThread() | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |