Updates listeners with provided configuration

@param newConfiguration configuration to be applied
425143
void updateListenersWithNewConfiguration(T newConfiguration) {
        for (ConfigurationListener<T> listener : listeners) {
            try {
                listener.updated(newConfiguration);
            } catch (Exception e) {
                logger.error("Updating a listener with new configuration failed.", e);
            }
        }
    }
469670
@Override
    public void configurationChanged() {

        HashSet<Param> changedParams = new HashSet();

        // read dynamic parameters
        for (Param param : parameters) {

            if (! param.isStatic()) {

                // preserve current value
                Object oldValue = param.getValue();

                // read new value
                readAndValidateParameter(param);

                // get if parameter value had changed
                if (! ConfigUtil.equalValues(oldValue, param.getValue())) {
                    changedParams.add(param);
                }
            }

        }

        // invoke listeners for all changed parameters
        if (! changedParams.isEmpty()) {

            for (ConfigChangeListener listener : configChangeListeners) {
                listener.configurationChanged(changedParams);
            }

        }

    }
1245254
private void configureEvent(CacheEntryListenerInvocation listenerInvocation,
                               EventImpl<K, V> e, K key, V value, boolean pre, InvocationContext ctx) {
      e.setPre(pre);
      e.setKey(convertKey(listenerInvocation, key));
      e.setValue(convertValue(listenerInvocation, value));
      e.setOriginLocal(ctx.isOriginLocal());
      setTx(ctx, e);
   }
1283851
private void updateCallbackConfiguration(String action, String type, String entity, List<AlarmCallbackConfiguration> streamCallbacks) {
        final AtomicBoolean ran = new AtomicBoolean(false);

        streamCallbacks.stream()
                .filter(callback -> callback.getType().equals(EmailAlarmCallback.class.getCanonicalName()))
                .forEach(callback -> {
                    ran.set(true);
                    final Map<String, Object> configuration = callback.getConfiguration();
                    String key;

                    if ("users".equals(type)) {
                        key = EmailAlarmCallback.CK_USER_RECEIVERS;
                    } else {
                        key = EmailAlarmCallback.CK_EMAIL_RECEIVERS;
                    }

                    @SuppressWarnings("unchecked")
                    final List<String> recipients = (List<String>) configuration.get(key);
                    if ("add".equals(action)) {
                        if (!recipients.contains(entity)) {
                            recipients.add(entity);
                        }
                    } else {
                        if (recipients.contains(entity)) {
                            recipients.remove(entity);
                        }
                    }
                    configuration.put(key, recipients);

                    final AlarmCallbackConfiguration updatedConfig = ((AlarmCallbackConfigurationImpl) callback).toBuilder()
                            .setConfiguration(configuration)
                            .build();
                    try {
                        alarmCallbackConfigurationService.save(updatedConfig);
                    } catch (ValidationException e) {
                        throw new BadRequestException("Unable to save alarm callback configuration", e);
                    }
                });

        if (!ran.get()) {
            throw new BadRequestException("Unable to " + action + " receiver: Stream has no email alarm callback.");
        }
    }
213961
def configure(self, listener):
        
        listener.capture([{re.compile('^_.+'): {'source': {'space': self._event_space, 'id': self._source_id}}}])
537460
public synchronized void addPropertyChangeListener(String propertyName, PropertyChangeListener listener) {
    	if(!ArrayUtils.contains(listener, getPropertyChangeListeners(propertyName))) {
			super.addPropertyChangeListener(propertyName, listener);
		}
    }
444062
@SuppressWarnings( "unchecked" )
    private static synchronized void configure(InputStream in) throws ConfigurationException
    {
        if( c_factories == null )
            c_factories = new HashMap<String, StopWatchFactory>();

        try
        {
            c_config.load(in);
        }
        catch (IOException e2)
        {
            throw new ConfigurationException(e2);
        }

        for( Enumeration<String> e = (Enumeration<String>) c_config.propertyNames(); e.hasMoreElements(); )
        {
            String key = e.nextElement();

            String[] components = key.split("\\.");

            if( components.length < 2 || !components[0].equals(PROPERTY_PREFIX) ) continue;

            String logger = components[1];

            StopWatchFactory swf = c_factories.get(logger);

            if( swf == null )
            {
                swf = new StopWatchFactory( instantiateLog(logger) );
            }

            //
            //  Call the respective setXXX() methods of the logger
            //  based on the configuration.
            //
            if( components.length > 2 )
            {
                String setting = components[2];

                String method = "set"+Character.toUpperCase(setting.charAt(0))+setting.substring(1);

                try
                {
                    SetterUtil.set( swf.getLog(), method, (String)c_config.get(key) );
                }
                catch( NoSuchMethodException e1 )
                {
                    log.warn("An unknown setting {} for logger {}, wasn't able to find {}.{}.  Continuing nevertheless.",
                             new Object[] {setting, logger, logger, method} );
                }
                catch (Exception e1)
                {
                    throw new ConfigurationException(e1);
                }
            }

            c_factories.put(logger, swf);
        }
    }
376518
public function onUpdateEvent(UpdateConfigurationEvent $event)
    {
        //====================================================================//
        // Check if Cache is Enabled
        if (!$this->configuration['cache']['enabled']) {
            Splash::log()->war('[Splash] Cache is Disabled');

            return;
        }
        //====================================================================//
        // Check if Filesystem Cache Exists
        if (!isset($this->cache)) {
            $this->cache = new FilesystemCache();
        }

        //====================================================================//
        // Detect Pointed Server Host
        $serverId = $this->hasWebserviceConfiguration($event->getWebserviceId());
        if ($serverId) {
            //====================================================================//
            // Update Configuration in Cache
            $this->cache->set(
                static::$cacheCfgKey.$serverId,
                $event->getConfiguration(),
                $this->configuration['cache']['lifetime']
            );
        }
        //====================================================================//
        // Stop Event Propagation
        $event->stopPropagation();
    }
115174
public void addListeners(PropertyChangeListener listener, Object newObject, Set updateSet) {
        removeListeners();
        if (newObject != null) {
            // check for local synthetics
            TriggerBinding syntheticTrigger = getSyntheticTriggerBinding(newObject);
            MetaClass mc = InvokerHelper.getMetaClass(newObject);
            if (syntheticTrigger != null) {
                PropertyBinding psb = new PropertyBinding(newObject, propertyName);
                PropertyChangeProxyTargetBinding proxytb = new PropertyChangeProxyTargetBinding(newObject, propertyName, listener);

                syntheticFullBinding = syntheticTrigger.createBinding(psb, proxytb);
                syntheticFullBinding.bind();
                updateSet.add(newObject);
            } else if (!mc.respondsTo(newObject, "addPropertyChangeListener", NAME_PARAMS).isEmpty()) {
                InvokerHelper.invokeMethod(newObject, "addPropertyChangeListener", new Object[] {propertyName, listener});
                localListener = listener;
                updateSet.add(newObject);
            } else if (!mc.respondsTo(newObject, "addPropertyChangeListener", GLOBAL_PARAMS).isEmpty()) {
                InvokerHelper.invokeMethod(newObject, "addPropertyChangeListener", listener);
                globalListener = listener;
                updateSet.add(newObject);
            }
        }
        currentObject = newObject;
    }
1351189
public ClientConfig setListenerConfigs(List<ListenerConfig> listenerConfigs) {
        Preconditions.isNotNull(listenerConfigs, "listenerConfigs");
        this.listenerConfigs.clear();
        this.listenerConfigs.addAll(listenerConfigs);
        return this;
    }
632840
def new_config_event(self):
        
        try:
            self.on_set_config()
        except Exception as ex:
            self.logger.exception(ex)
            raise StopIteration()
285606
public void updateConfig(AbstractInterfaceConfig config, String configPath, ChildData data) {
        if (data == null) {
            if (LOGGER.isInfoEnabled(config.getAppName())) {
                LOGGER.infoWithApp(config.getAppName(), "Receive update data is null");
            }
        } else {
            if (LOGGER.isInfoEnabled(config.getAppName())) {
                LOGGER.infoWithApp(config.getAppName(), "Receive update data: path=[" + data.getPath() + "]"
                    + ", data=[" + StringSerializer.decode(data.getData()) + "]"
                    + ", stat=[" + data.getStat() + "]");
            }
            notifyListeners(config, configPath, data, false);
        }
    }
288953
public static void updateInstrumentation(CollectorConfiguration config) throws Exception {
        List<String> scripts = new ArrayList<String>();
        List<String> scriptNames = new ArrayList<String>();
        Map<String, Instrumentation> instrumentTypes=config.getInstrumentation();

        for (Map.Entry<String, Instrumentation> stringInstrumentationEntry : instrumentTypes.entrySet()) {
            Instrumentation types = stringInstrumentationEntry.getValue();
            String rules = ruleTransformer.transform(stringInstrumentationEntry.getKey(), types,
                            config.getProperty("version."+ stringInstrumentationEntry.getKey(), null));

            if (log.isLoggable(Level.FINER)) {
                log.finer("Update instrumentation script name=" + stringInstrumentationEntry.getKey() + " rules=" + rules);
            }

            if (rules != null) {
                scriptNames.add(stringInstrumentationEntry.getKey());
                scripts.add(rules);
            }
        }

        PrintWriter writer = new PrintWriter(new StringWriter());

        transformer.installScript(scripts, scriptNames, writer);

        writer.close();
    }
947269
protected function callConfiguratorsOnce()
    {
        if ($this->configuratorsCalled) {
            return;
        }

        foreach (static::$configurators as $listener) {
            call_user_func($listener, $this, $this->container);
        }

        $this->configuratorsCalled = true;
    }
1319746
public function updateConfiguration()
    {
        $this->getEventDispatcher()->dispatch(
            UpdateConfigurationEvent::NAME,
            new UpdateConfigurationEvent($this->getWebserviceId(), $this->getConfiguration())
        );
    }
65904
public void setConfigure(java.util.Collection<String> configure) {
        if (configure == null) {
            this.configure = null;
            return;
        }

        this.configure = new com.amazonaws.internal.SdkInternalList<String>(configure);
    }
1172690
public static synchronized void update(Map<String, Object> newConfig) {
        if (newConfig == null)
            throw new NullPointerException("Updated config must not be null");

        boolean traceWasDisabled = !TraceComponent.isAnyTracingEnabled();

        // Update the logging configuration
        LogProviderConfig config = loggingConfig.get().get();
        if (config != null) {
            config.update(newConfig);

            Object o = newConfig.get("suppressSensitiveTrace");

            if (o != null) {
                if (o instanceof String) {
                    suppressSensitiveTrace = Boolean.parseBoolean((String) o);
                } else if (o instanceof Boolean) {
                    suppressSensitiveTrace = (Boolean) o;
                }
                if (suppressSensitiveTrace == true && safeLevelsIndex == null) {
                    setupSafeLevelsIndex();
                }
            }

            TraceSpecification newTs = setTraceSpec(config.getTraceString());

            // For updates only, warn if there are strings that we don't know
            if (defaultUpdated && newTs != null)
                newTs.warnUnmatchedSpecs();

            // we've updated the defaults from server.xml (we can set this a million times.. 
            // first pass through is the key.. 
            defaultUpdated = true;

            // Propagate updates to the delegate
            getDelegate().update(config);
        }

        // issue warning if trace has been enabled and there's no instrumentation agent
        if (!instrumentationAvailable && traceWasDisabled && TraceComponent.isAnyTracingEnabled()) {
            Tr.warning(TraceSpecification.getTc(), "INSTRUMENTATION_SERVICE_UNAVAILABLE");
        }
    }