@Override public ReplicationConfig setConfigParam(String paramName, String value) throws IllegalArgumentException { if (ReplicationNetworkConfig.getRepNetPropertySet(). contains(paramName)) { getRepNetConfig().setConfigParam(paramName, value); } else { DbConfigManager.setConfigParam(props, paramName, value, false, /* require mutability. */ validateParams, true, /* forReplication */ true); /* verifyForReplication */ } return this; }
/** * Returns a copy of this configuration object. */ @Override public ReplicationConfig clone() { try { ReplicationConfig copy = (ReplicationConfig) super.clone(); copy.setRepNetConfig(getRepNetConfig().clone()); return copy; } catch (CloneNotSupportedException willNeverOccur) { return null; } }
final ReplicationNetworkConfig rnConfig = getRepNetConfig(); if (rnConfig == null) { setRepNetConfig(ReplicationNetworkConfig.create(props));
MonitorConfig(ReplicationConfig repConfig) { props = new Properties(); repNetConfig = repConfig.getRepNetConfig().clone(); setNodeName(repConfig.getNodeName()); setGroupName(repConfig.getGroupName()); setNodeHostPort(repConfig.getNodeHostPort()); setHelperHosts(repConfig.getHelperHosts()); if (!repConfig.getNodeType().isMonitor()) { throw new IllegalArgumentException ("The configured node type was: " + repConfig.getNodeType() + " instead of: " + NodeType.MONITOR); } }
((ReplicationConfig)repConfigProxy).getRepNetConfig(); nodeState = new NodeState(nameIdPair, this);