/** * Called when the physical contents of a config file have changed. * * <p> * Triggers calls to {@link ConfigStoreListener#onChange(String)} on all registered listeners. * * @param name The config name (e.g. the filename without the extension). * @param contents The new contents. * @return This object (for method chaining). */ public synchronized ConfigStore update(String name, String contents) { Set<ConfigStoreListener> s = listeners.get(name); if (s != null) for (ConfigStoreListener l : listeners.get(name)) l.onChange(contents); return this; }
/** * Called when the physical contents of a config file have changed. * * <p> * Triggers calls to {@link ConfigStoreListener#onChange(String)} on all registered listeners. * * @param name The config name (e.g. the filename without the extension). * @param contents The new contents. * @return This object (for method chaining). */ public synchronized ConfigStore update(String name, String contents) { name = resolveName(name); Set<ConfigStoreListener> s = listeners.get(name); if (s != null) for (ConfigStoreListener l : listeners.get(name)) l.onChange(contents); return this; }
/** * Called when the physical contents of a config file have changed. * * <p> * Triggers calls to {@link ConfigStoreListener#onChange(String)} on all registered listeners. * * @param name The config name (e.g. the filename without the extension). * @param contents The new contents. * @return This object (for method chaining). */ public synchronized ConfigStore update(String name, String contents) { name = resolveName(name); Set<ConfigStoreListener> s = listeners.get(name); if (s != null) for (ConfigStoreListener l : listeners.get(name)) l.onChange(contents); return this; }