public interface ConfigurationHandler
AgentConstants.CONFIG_KEY_NAMESPACE
through system properties when the
agent starts. If the launcher wants to retain existing persisted values, instead of overwriting them, it should
specify an additional property with the same name post-fixed with AgentConstants.CONFIG_KEY_RETAIN
set to
true
. agent.controller.syncinterval=3000
agent.controller.syncinterval.retain=true
Modifier and Type | Method and Description |
---|---|
java.lang.String |
get(java.lang.String key,
java.lang.String defaultValue)
Retrieve the configuration value associated with the key, or the specified default.
|
boolean |
getBoolean(java.lang.String key,
boolean defaultValue)
Retrieve the configuration value associated with the key, or the specified default.
|
int |
getInt(java.lang.String key,
int defaultValue)
Retrieve the configuration value associated with the key, or the specified default.
|
long |
getLong(java.lang.String key,
long defaultValue)
Retrieve the configuration value associated with the key, or the specified default.
|
java.util.Set<java.lang.String> |
keySet()
Deprecated.
do not use, no replacement.
|
void |
putAll(java.util.Map<java.lang.String,java.lang.String> props)
Store a configuration value.
|
java.lang.String get(java.lang.String key, java.lang.String defaultValue)
key
- The key, must not be null
defaultValue
- The default value, must not be null
boolean getBoolean(java.lang.String key, boolean defaultValue)
key
- The key, must not be null
defaultValue
- The default valueint getInt(java.lang.String key, int defaultValue)
key
- The key, must not be null
defaultValue
- The default valuelong getLong(java.lang.String key, long defaultValue)
key
- The key, must not be null
defaultValue
- The default value@Deprecated java.util.Set<java.lang.String> keySet()
void putAll(java.util.Map<java.lang.String,java.lang.String> props)
props
- the properties to put, cannot be null
.