private final class AbstractDgcClient.EndpointEntry extends Object
Modifier and Type | Class and Description |
---|---|
private class |
AbstractDgcClient.EndpointEntry.RefEntry
RefEntry encapsulates the client-side DGC information specific to
a particular object ID of an endpoint (a unique live reference
value).
|
private class |
AbstractDgcClient.EndpointEntry.RenewCleanThread
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 AbstractDgcClient.DgcProxy |
dgcProxy
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 Object |
endpoint
the endpoint that this EndpointEntry is for
|
private long |
expirationTime
absolute time current lease to this endpoint will expire
|
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<AbstractDgcClient.CleanRequest> |
pendingCleans
set of clean calls that need to be made, changed Set to an
underlying ConcurrentHashMap because no lock is held while
iterating and processing pending Clean Requests
|
private ReferenceQueue |
refQueue
reference queue for phantom references
|
private Map |
refTable
table of refs held for endpoint: maps object ID 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
|
Modifier | Constructor and Description |
---|---|
private |
EndpointEntry(Object endpoint) |
Modifier and Type | Method and Description |
---|---|
private Object[] |
createObjectIDArray(Set refEntries)
Creates an array of object IDs (needed for the DGC remote calls)
from the ids in the given set of refs.
|
private void |
makeCleanCalls()
Makes all of the clean calls described by the clean requests in
this entry's set of "pending cleans".
|
private void |
makeDirtyCall(Set refEntries,
long sequenceNum)
Makes a DGC dirty call to this entry's endpoint, for the
object IDs corresponding to the given set of refs and with
the given sequence number.
|
(package private) boolean |
pendingCleanCalls() |
private void |
processPhantomRefs(AbstractDgcClient.EndpointEntry.RefEntry.PhantomLiveRef phantom)
Processes the notification of the given phantom reference and any
others that are on this entry's reference queue.
|
(package private) boolean |
registerRefs(Collection refs)
Registers the live reference instances in the supplied list to
participate in distributed garbage collection.
|
(package private) boolean |
removed() |
private void |
removeRefEntry(AbstractDgcClient.EndpointEntry.RefEntry refEntry)
Removes the given RefEntry from the ref table.
|
private void |
setRenewTime(long newRenewTime)
Sets the absolute time at which the lease for this entry should
be renewed.
|
private void |
start() |
private final Object endpoint
private final AbstractDgcClient.DgcProxy dgcProxy
private final Thread renewCleanThread
private final ReferenceQueue refQueue
private volatile boolean removed
private final Map refTable
private final Set invalidRefs
private long renewTime
private long expirationTime
private int dirtyFailures
private long dirtyFailureStartTime
private long dirtyFailureDuration
private boolean interruptible
private final Set<AbstractDgcClient.CleanRequest> pendingCleans
private EndpointEntry(Object endpoint)
private void start()
boolean pendingCleanCalls()
boolean removed()
boolean registerRefs(Collection refs)
private void removeRefEntry(AbstractDgcClient.EndpointEntry.RefEntry refEntry)
private void makeDirtyCall(Set refEntries, long sequenceNum)
private void setRenewTime(long newRenewTime)
private void processPhantomRefs(AbstractDgcClient.EndpointEntry.RefEntry.PhantomLiveRef phantom)
private void makeCleanCalls()
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.