public synchronized void replicantsChanged( String key, List newReplicants, int newReplicantsViewId, boolean merge) { super.replicantsChanged(key, newReplicants, newReplicantsViewId, merge); // we now update all generated proxies // int max = generatedProxies.size(); ArrayList trash = new ArrayList(); for (int i = 0; i < max; i++) { SoftReference ref = (SoftReference) generatedProxies.get(i); HARMIClient proxy = (HARMIClient) ref.get(); if (proxy == null) { trash.add(ref); } else { proxy.updateClusterInfo(this.replicants, this.clusterViewId); } } if (trash.size() > 0) generatedProxies.removeAll(trash); }
public void init() throws Exception { super.init(); generatedProxies = new ArrayList(); }