/** * Clear a property in the configuration. * * @param key the key to remove along with corresponding value. */ @Override protected void clearPropertyDirect(String key) { if (containsKey(key)) { store.remove(key); } }
/** * Clear a property in the configuration. * * @param key the key to remove along with corresponding value. */ @Override protected void clearPropertyDirect(String key) { if (containsKey(key)) { store.remove(key); } }
@Override public boolean containsKey(String key) { reload(); synchronized (reloadLock) { return super.containsKey(key); } }
@Override public boolean containsKey(String key) { reload(); synchronized (reloadLock) { return super.containsKey(key); } }
public synchronized List<Object> getListConfigProperty(Config.ConfigProperty configProperty) { SeLionLogger.getLogger().entering(configProperty); checkArgument(configProperty != null, "Config property cannot be null"); // Search locally then query SeLionConfig if not found List<Object> propValue = null; if (baseConfig.containsKey(configProperty.getName())) { propValue = baseConfig.getList(configProperty.getName()); } if (propValue == null || propValue.isEmpty()) { propValue = Config.getListConfigProperty(configProperty); } SeLionLogger.getLogger().exiting(propValue); return propValue; }
public synchronized int getIntConfigProperty(Config.ConfigProperty configProperty) { SeLionLogger.getLogger().entering(configProperty); checkArgument(configProperty != null, "Config property cannot be null"); // start with the global value, then update from the local value, if it exists int propValue = Config.getIntConfigProperty(configProperty); if (baseConfig.containsKey(configProperty.getName())) { propValue = baseConfig.getInt(configProperty.getName()); } SeLionLogger.getLogger().exiting(propValue); return propValue; }
public synchronized boolean getBooleanConfigProperty(Config.ConfigProperty configProperty) { SeLionLogger.getLogger().entering(configProperty); checkArgument(configProperty != null, "Config property cannot be null"); // start with the global value, then update from the local value, if it exists boolean propValue = Config.getBoolConfigProperty(configProperty); if (baseConfig.containsKey(configProperty.getName())) { propValue = baseConfig.getBoolean(configProperty.getName()); } SeLionLogger.getLogger().exiting(propValue); return propValue; }
/** * Get the configuration property value for configProperty. * * @param configProperty * The configuration property value to get * * @return The configuration property value or null if property does not exit. */ public synchronized String getConfigProperty(Config.ConfigProperty configProperty) { SeLionLogger.getLogger().entering(configProperty); checkArgument(configProperty != null, "Config property cannot be null"); // Search locally then query SeLionConfig if not found String propValue = null; if (baseConfig.containsKey(configProperty.getName())) { propValue = baseConfig.getString(configProperty.getName()); } if (StringUtils.isBlank(propValue)) { propValue = Config.getConfigProperty(configProperty); } SeLionLogger.getLogger().exiting(propValue); return propValue; }