public class ConfigDef extends Object implements Serializable
ConfigDef.Mode.DEFAULT
, ConfigDef.Mode.REPLACE
, and ConfigDef.Mode.UPDATE
.
Modifier and Type | Class and Description |
---|---|
static interface |
ConfigDef.Getter |
static class |
ConfigDef.Mode |
static interface |
ConfigDef.Setter |
Modifier and Type | Field and Description |
---|---|
protected Map<ConfigDef.Mode,Map<String,String>> |
config |
Constructor and Description |
---|
ConfigDef() |
Modifier and Type | Method and Description |
---|---|
void |
apply(ConfigDef.Mode mode,
ConfigDef.Setter setter) |
String |
apply(String key,
ConfigDef.Getter getter) |
Collection<String> |
getAllKeys() |
protected Map<String,String> |
getMode(ConfigDef.Mode mode) |
protected Map<String,String> |
getModeSafe(ConfigDef.Mode mode) |
boolean |
isEmpty()
Returns
true if there are no properties. |
ConfigDef |
setProperty(ConfigDef.Mode mode,
String key,
String value)
Method setProperty sets the value to the given key using the given
ConfigDef.Mode value. |
ConfigDef |
setProperty(String key,
String value)
Method setProperty sets the value to the given key using the
ConfigDef.Mode.REPLACE mode. |
public ConfigDef()
public ConfigDef setProperty(String key, String value)
ConfigDef.Mode.REPLACE
mode.key
- the keyvalue
- the valuepublic ConfigDef setProperty(ConfigDef.Mode mode, String key, String value)
ConfigDef.Mode
value.key
- the keyvalue
- the valueprotected Map<String,String> getMode(ConfigDef.Mode mode)
protected Map<String,String> getModeSafe(ConfigDef.Mode mode)
public boolean isEmpty()
true
if there are no properties.public String apply(String key, ConfigDef.Getter getter)
public void apply(ConfigDef.Mode mode, ConfigDef.Setter setter)
public Collection<String> getAllKeys()
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.