protected String getLocators(DistributionConfig config) { return config.getLocators(); }
String locators = dsc.getLocators(); if (locators == null || locators.equals("")) { sb.append("using multicast ");
String locators = dsc.getLocators(); if (locators == null || locators.equals("")) { sb.append("using multicast ");
/** * Returns whether or not the given configuration properties refer * to the same distributed system as this * <code>InternalDistributedSystem</code> connection. * * @since 4.0 */ public boolean sameSystemAs(Properties props) { DistributionConfig other = DistributionConfigImpl.produce(props); DistributionConfig me = this.getConfig(); if (!me.getBindAddress().equals(other.getBindAddress())) { return false; } // @todo Do we need to compare SSL properties? // locators String myLocators = me.getLocators(); String otherLocators = other.getLocators(); // quick check if (myLocators.equals(otherLocators)) { return true; } else { myLocators = canonicalizeLocators(myLocators); otherLocators = canonicalizeLocators(otherLocators); return myLocators.equals(otherLocators); } }
String myLocators = me.getLocators(); String otherLocators = other.getLocators();
if (theConfig.getLocators().length() > 0 && !Locator.hasLocators()) { defaultJoinTimeout = 60000;
.getConfig().getLocators(); if (locators.length() == 0) { throw new IllegalStateException(
String locators = distConfig.getLocators(); String mcastAddress = InetAddressUtil.toString(distConfig.getMcastAddress()); int mcastPort = distConfig.getMcastPort();
protected void initializeDistributedSystem(DistributedSystem distributedSystem) { InternalDistributedSystem ids = (InternalDistributedSystem) distributedSystem; setMemberId(ids.getMemberId()); DistributionConfig config = ids.getConfig(); setMemberName(config.getName()); setMcastPort(config.getMcastPort()); setMcastAddress(config.getMcastAddress()); String bindAddress = config.getBindAddress(); setBindAddress(bindAddress); setLocators(config.getLocators()); setUpTime(System.currentTimeMillis() - ids.getStartTime()); try { setHostAddress((bindAddress != null && bindAddress.length() > 0) ? InetAddress.getByName(bindAddress) : SocketCreator.getLocalHost()); } catch (IOException e) {/*ignore - leave null host address*/} }
protected static void connectAdminSystem() throws Exception { assertTrue(!system.getConfig().getLocators().equals("")); DistributedSystemConfig config = AdminDistributedSystemFactory.defineDistributedSystem(system, null); assertEquals(system.getConfig().getLocators(), config.getLocators()); assertEquals(system.getConfig().getMcastPort(), config.getMcastPort()); getLogWriter().info("Locators are: " + config.getLocators() + ", mcast port is: " + config.getMcastPort()); AdminDistributedSystem admin = AdminDistributedSystemFactory.getDistributedSystem(config); admin.connect(); assertTrue(admin.waitToBeConnected(5 * 1000)); }
protected void initializeDistributedSystem(DistributedSystem distributedSystem) { InternalDistributedSystem ids = (InternalDistributedSystem) distributedSystem; setMemberId(ids.getMemberId()); DistributionConfig config = ids.getConfig(); setMemberName(config.getName()); setMcastPort(config.getMcastPort()); setMcastAddress(config.getMcastAddress()); String bindAddress = config.getBindAddress(); setBindAddress(bindAddress); setLocators(config.getLocators()); setUpTime(System.currentTimeMillis() - ids.getStartTime()); try { setHostAddress((bindAddress != null && bindAddress.length() > 0) ? InetAddress.getByName(bindAddress) : SocketCreator.getLocalHost()); } catch (IOException e) {/*ignore - leave null host address*/} }
config.setLocators(dsConfig.getLocators()); config.setBindAddress(DistributedTestCase.getIPLiteral());
+ '[' + getDUnitLocatorPort() + ']'); InternalDistributedSystem system = this.getSystem(props); assertTrue(!system.getConfig().getLocators().equals("")); assertEquals(system.getConfig().getLocators(), config.getLocators()); assertEquals(system.getConfig().getMcastPort(),
.getConfig().getLocators(); if (locators.length() == 0) { throw new IllegalStateException(
.getConfig().getLocators(); if (locators.length() == 0) { throw new GatewaySenderConfigurationException(
if (dc.getMcastPort() != 0 && dc.getLocators().trim().isEmpty() && dc.getStartLocator().trim().isEmpty()) { throw new GemFireConfigException( "Multicast cannot be configured for a non-distributed cache." + " Please configure the locator services for this cache using " locators = GMSUtil.parseLocators(dconfig.getLocators(), bindAddr);
assertTrue(!system.getConfig().getLocators().equals("")); assertEquals(system.getConfig().getLocators(), config.getLocators()); assertEquals(system.getConfig().getMcastPort(),
this.locators = distConfig.getLocators(); this.membershipPortRange = getMembershipPortRangeString(distConfig.getMembershipPortRange());
this.locators = distConfig.getLocators(); this.membershipPortRange = getMembershipPortRangeString(distConfig.getMembershipPortRange());
String locators = distConfig.getLocators(); String mcastAddress = InetAddressUtil.toString(distConfig.getMcastAddress()); int mcastPort = distConfig.getMcastPort();