com.sun.jini.jeri.internal.runtime
Class AbstractDgcClient.EndpointEntry.RefEntry

java.lang.Object
  extended by com.sun.jini.jeri.internal.runtime.AbstractDgcClient.EndpointEntry.RefEntry
Enclosing class:
AbstractDgcClient.EndpointEntry

private class AbstractDgcClient.EndpointEntry.RefEntry
extends Object

RefEntry encapsulates the client-side DGC information specific to a particular object ID of an endpoint (a unique live reference value). In particular, it contains a set of phantom references to all of the live reference instances for the given object ID and endpoint in this VM that have been registered with this AbstractDgcClient (but not yet garbage collected locally).


Nested Class Summary
(package private)  class AbstractDgcClient.EndpointEntry.RefEntry.PhantomLiveRef
          PhantomLiveRef is a PhantomReference to a live reference instance, used to detect when the particular live reference becomes permanently unreachable in this VM.
 
Field Summary
private  boolean dirtyFailed
          true if a dirty call containing this ref has failed
private  Object objectID
          the object ID that this RefEntry is for (the endpoint is implied by the outer EndpointEntry instance)
private  Set refSet
          set of phantom references to registered instances
 
Constructor Summary
AbstractDgcClient.EndpointEntry.RefEntry(Object objectID)
           
 
Method Summary
(package private)  void addInstanceToRefSet(Object ref)
          Adds a live reference to the set of registered instances for this entry.
(package private)  Object getObjectID()
          Returns the object ID that this entry is for.
(package private)  boolean hasDirtyFailed()
          Returns true if a dirty call that explicitly contained this entry's ref value has failed (and therefore a clean call for the ref value needs to be marked "strong").
(package private)  boolean isRefSetEmpty()
          Returns true if there are no registered live reference instances for this entry still reachable in this VM.
(package private)  void markDirtyFailed()
          Records that a dirty call that explicitly contained this entry's ref value has failed.
(package private)  void removeInstanceFromRefSet(AbstractDgcClient.EndpointEntry.RefEntry.PhantomLiveRef phantom)
          Removes a PhantomLiveRef from the set of registered instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objectID

private final Object objectID
the object ID that this RefEntry is for (the endpoint is implied by the outer EndpointEntry instance)


refSet

private final Set refSet
set of phantom references to registered instances


dirtyFailed

private boolean dirtyFailed
true if a dirty call containing this ref has failed

Constructor Detail

AbstractDgcClient.EndpointEntry.RefEntry

AbstractDgcClient.EndpointEntry.RefEntry(Object objectID)
Method Detail

getObjectID

Object getObjectID()
Returns the object ID that this entry is for.


addInstanceToRefSet

void addInstanceToRefSet(Object ref)
Adds a live reference to the set of registered instances for this entry. This method must ONLY be invoked while synchronized on this RefEntry's EndpointEntry.


removeInstanceFromRefSet

void removeInstanceFromRefSet(AbstractDgcClient.EndpointEntry.RefEntry.PhantomLiveRef phantom)
Removes a PhantomLiveRef from the set of registered instances. This method must ONLY be invoked while synchronized on this RefEntry's EndpointEntry.


isRefSetEmpty

boolean isRefSetEmpty()
Returns true if there are no registered live reference instances for this entry still reachable in this VM. This method must ONLY be invoked while synchronized on this RefEntry's EndpointEntry.


markDirtyFailed

void markDirtyFailed()
Records that a dirty call that explicitly contained this entry's ref value has failed. This method must ONLY be invoked while synchronized on this RefEntry's EndpointEntry.


hasDirtyFailed

boolean hasDirtyFailed()
Returns true if a dirty call that explicitly contained this entry's ref value has failed (and therefore a clean call for the ref value needs to be marked "strong"). This method must ONLY be invoked while synchronized on this RefEntry's EndpointEntry.



Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.