* DistributedState to see if we can remove/narrow the synchronization.
*/
public synchronized void replicantsChanged(String key, java.util.List newReplicants, int newReplicantsViewId,
boolean merge)
{
DistributedReplicantManager drm = this.partition.getDistributedReplicantManager();
if (key.equals(this.RPC_HANDLER_NAME) && drm.isMasterReplica(this.RPC_HANDLER_NAME))
{
this.log.debug("The list of replicants for the JG bridge has changed, computing and updating local info...");
DistributedState ds = this.partition.getDistributedStateService();
// we remove any entry from the DS whose node is dead
//
java.util.Collection coll = ds.getAllKeys(this.RPC_HANDLER_NAME);
if (coll == null)
{
this.log.debug("... No bridge info was associated with this node");
return;
}
// to avoid ConcurrentModificationException, we copy the list of keys in a new structure
//
ArrayList collCopy = new java.util.ArrayList(coll);
java.util.List newReplicantsNodeNames = drm.lookupReplicantsNodeNames(this.RPC_HANDLER_NAME);
for (int i = 0; i < collCopy.size(); i++)
{
String nodeEntry = (String) collCopy.get(i);
if (!newReplicantsNodeNames.contains(nodeEntry))