if (this.serverIps.size() != 1) {
String msg = "ZooDiscovery property "
+ ZOODISCOVERY_FLAVOR_CENTRALIZED
+ " must contain exactly one IP address designating the location of the ZooDiscovery instance playing this central role.";
Logger.log(LogService.LOG_ERROR, msg, null);
throw new ServiceException(msg);
}
} else if (getConfigProperties().containsKey(
ZOODISCOVERY_FLAVOR_REPLICATED)) {
this.setFlavor(FLAVOR.REPLICATED);
this.serverIps = parseIps();
if (!this.serverIps.contains(Geo.getHost())) {
this.serverIps.add(Geo.getHost());
}
if (this.serverIps.size() < 2) {
String msg = "Industrial Discovery property "//$NON-NLS-1$
+ IDiscoveryConfig.ZOODISCOVERY_FLAVOR_REPLICATED
+ " must contain at least one IP address which is not localhost.";
Logger.log(LogService.LOG_ERROR, msg, null);
throw new ServiceException(msg);
}
} else if (getConfigProperties().containsKey(
ZOODISCOVERY_FLAVOR_STANDALONE)) {
this.setFlavor(FLAVOR.STANDALONE);