/** * @hidden * Ensure that the parameters for this and all known derived classes are * registered. This is called by testing code to ensure that parameter * registration happens when non-standard API access is used. */ public static void registerParams() { /* Call for side effect */ getRepNetPropertySet(); }
/** * @hidden * Apply the configurations specified in sourceProps to updateProps, * effectively copying the replication service access properties from the * sourceProps hash. Only the source properties that are applicable to * a ReplicationNetworkConfig are used. * * @throws IllegalArgumentException if any of the contained property * entries have invalid values */ public static void applyRepNetProperties(Properties sourceProps, Properties updateProps) throws IllegalArgumentException { final Set<String> repNetProps = getRepNetPropertySet(); for (Map.Entry<Object, Object> propPair : sourceProps.entrySet()) { final String name = (String) propPair.getKey(); if (!repNetProps.contains(name)) { continue; } final String value = (String) propPair.getValue(); setConfigParam(updateProps, name, value, true /* validateParams */); } }
@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; }