/** * Returns whether or not this distributed system has the same * configuration as the given set of properties. * * @see DistributedSystem#connect */ public boolean sameAs(Properties props, boolean isConnected) { return originalConfig.sameAs(DistributionConfigImpl.produce(props, isConnected)); }
/** * Returns whether or not this distributed system has the same * configuration as the given set of properties. * * @see DistributedSystem#connect */ public boolean sameAs(Properties props) { return originalConfig.sameAs(DistributionConfigImpl.produce(props)); }
StringBuilder sb = new StringBuilder(); DistributionConfig wanted = DistributionConfigImpl.produce(propsToCheck);
StringBuffer sb = new StringBuffer(); DistributionConfig wanted = DistributionConfigImpl.produce(propsToCheck);
/** * 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); } }
DistributionConfig other = DistributionConfigImpl.produce(props); DistributionConfig me = this.getConfig();