*/
protected void removeLocatorsOneReg(LookupLocator[] locators,
Map.Entry regListenerPair)
throws RemoteException
{
LookupDiscoveryRegistration reg
= (LookupDiscoveryRegistration)regListenerPair.getKey();
RegistrationInfo regInfo
= ((LDSEventListener)regListenerPair.getValue()).getRegInfo();
LookupLocator[] curLocatorsToDiscover = regInfo.locatorsToDiscover;
LookupLocator[] locatorsToRemove = locators;
LookupLocator[] newLocatorsToDiscover = new LookupLocator[0];
if( (curLocatorsToDiscover != null) && (locatorsToRemove != null) ) {
int curLen = curLocatorsToDiscover.length;
int remLen = locatorsToRemove.length;
ArrayList newList = new ArrayList(curLen+remLen);
iLoop:
for(int i=0;i<curLen;i++) {
for(int j=0;j<remLen;j++) {
if( locsEqual
(curLocatorsToDiscover[i],locatorsToRemove[j]) )
{
continue iLoop;
}//endif
}//endloop(j)
newList.add(curLocatorsToDiscover[i]);
}//end loop(i)
newLocatorsToDiscover = (LookupLocator[])(newList.toArray
(new LookupLocator[newList.size()]));
synchronized(regInfo) {
/* update the expected state for this regInfo information */
regInfo.setLookupsToDiscover
(DiscoveryGroupManagement.NO_GROUPS,
newLocatorsToDiscover);
}//end sync(regInfo)
}//endif
/* remove the locators the lds should discover for this registration */
reg.removeLocators(locators);
}//end removeLocatorsOneReg