public void incrementalUpdate(CollectionSettingName name, Serializable value) { if (MAX_TRACKED_CONNECTIONS_SETTING.equals(name)) { int newCapacity = CollectionSettingsRegistry.getIntegerSettingValue(value); if (newCapacity <= 0) { throw new IllegalArgumentException("Non-positive capacity N/A: " + value); } int oldCapacity = maxCapacity; maxCapacity = newCapacity; logger.info("incrementalUpdate(" + name + ") " + oldCapacity + " => " + maxCapacity); } else if (CONNECTION_TRACKING_LOGGING_SETTING.equals(name)) { Level oldLevel = logLevel; logLevel = CollectionSettingsRegistry.getLogLevelSetting(value); logger.info("incrementalUpdate(" + name + ") " + oldLevel + " => " + logLevel); } else if (logger.isLoggable(Level.FINE)) { logger.fine("incrementalUpdate(" + name + ")[" + value + "] ignored"); } }
public void incrementalUpdate(CollectionSettingName name, Serializable value) { if (OBSCURED_ADDRESSES_PATTERN_SETTING.equals(name)) { Logger LOG = Logger.getLogger(getClass().getName()); String curValue = (obscuredAddressesPattern == null) ? NO_PATTERN_VALUE : obscuredAddressesPattern.pattern(); String newValue = StringUtil.safeToString(value); if (StringUtil.safeCompare(curValue, newValue) != 0) { Pattern newPattern = (StringUtil.isEmpty(newValue) || NO_PATTERN_VALUE.equalsIgnoreCase(newValue)) ? null : CollectionSettingsRegistry.getPatternSettingValue(value); LOG.info("incrementalUpdate(" + name + "): " + curValue + " => " + newValue); obscuredAddressesPattern = newPattern; } } else if (HttpObfuscator.OBFUSCATED_HEADERS_SETTING.equals(name)) { obfuscator.incrementalUpdate(name, value); // make sure change is propagated } }