@Override public void removedDistributedSystem(int remoteDsId) { removeCount++; List<Locator> locatorsConfigured = Locator.getLocators(); Locator locator = locatorsConfigured.get(0); Map<Integer, Set<DistributionLocatorId>> allSiteMetaData = ((InternalLocator) locator).getlocatorMembershipListener().getAllLocatorsInfo(); System.out.println("Removed : allSiteMetaData : " + allSiteMetaData); }
/** * Please note that dynamic addition of the sender id to region is not yet available. */ @Override public void addedDistributedSystem(int remoteDsId) { addCount++; List<Locator> locatorsConfigured = Locator.getLocators(); Locator locator = locatorsConfigured.get(0); Map<Integer, Set<DistributionLocatorId>> allSiteMetaData = ((InternalLocator) locator).getlocatorMembershipListener().getAllLocatorsInfo(); System.out.println("Added : allSiteMetaData : " + allSiteMetaData); }
public void updateLocalLocators() { List locators = Locator.getLocators(); for (int i = 0; i < locators.size(); i++) { InternalLocator l = (InternalLocator) locators.get(i); ServerLocator serverLocator = l.getServerLocatorAdvisee(); if (serverLocator != null) { serverLocator.updateLoad(location, load, this.clientIds); } } }
/** * Tell local controllers about the received profile. Also if exchange profiles then add each * local controller to reply. * * @since GemFire 5.7 */ protected void tellLocalControllers(boolean removeProfile, boolean exchangeProfiles, final List<Profile> replyProfiles) { final List<Locator> locators = Locator.getLocators(); for (int i = 0; i < locators.size(); i++) { InternalLocator l = (InternalLocator) locators.get(i); DistributionAdvisee advisee = l.getServerLocatorAdvisee(); if (advisee != null && advisee.getProfile().equals(this)) { continue; } // negative value for port indicates fake profile // meant to only gather remote profiles during profile exchange if (this.port > 0) { handleDistributionAdvisee(advisee, removeProfile, exchangeProfiles, replyProfiles); } else if (exchangeProfiles && advisee != null) { replyProfiles.add(advisee.getProfile()); } } }
protected void initialize(DistributedSystem distributedSystem) { // Initialize instance variables initializeInstanceVariables(); // If the cache is set, initialize the status. // If the cache is not set, then this is most // likely an unconnected status. if (cache != null) { // Initialize server initializeServer(); // Initialize client initializeClient(); // Initialize region sizes initializeRegionSizes(); } if (distributedSystem != null) { // Initialize all initializeAll(distributedSystem); } // If this is a locator, initialize the locator status if (Locator.getLocators().size() > 0) { setIsLocator(true); } }
if (getDMType() == ADMIN_ONLY_DM_TYPE && Locator.getLocators().size() == 0) {