K - The type of the identifier which identifies data.V - The type of the data.public abstract class ConfigFileUpdater<K,V> extends AbstractConfigFileUpdater<K,V>
ConfigFileUpdater describes changes to be applied to the
configuration file.
Note that this class is not synchronized.
| Modifier | Constructor and Description |
|---|---|
protected |
ConfigFileUpdater(XmlConfigFile.Type ftype,
String desc)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addRemoved(K key)
Add the removed data to be removed from the configuration file.
|
boolean |
addUpdated(K key,
V value,
boolean created)
Add the created or updated data to be saved into the configuration file.
|
protected void |
onRemoved(K key)
Invoked when the configuration file associated with the given data
is removed.
|
protected boolean |
onUpdated(K key,
V value)
Invoked when the given data is saved into the configuration file.
|
addUpdated, apply, fixUp, isChanged, isRemoved, setChangedprotected ConfigFileUpdater(XmlConfigFile.Type ftype, String desc)
ftype - The type of the XML configuration file.desc - A brief description about the target data.public final boolean addUpdated(K key, V value, boolean created)
key - The identifier of the given data.value - The value to be saved into the configuration file.created - true means that the given data has been newly
created.true only if the given data was actually added.public final boolean addRemoved(K key)
addRemoved in class AbstractConfigFileUpdater<K,V>key - The identifier of the removed data.true only if the given data was actually added.protected final boolean onUpdated(K key, V value)
onUpdated in class AbstractConfigFileUpdater<K,V>key - The identifier of the given data.value - The value to be saved into the configuration file.true if the given data is newly created data.
Otherwise false.protected final void onRemoved(K key)
onRemoved in class AbstractConfigFileUpdater<K,V>key - The identifier of the removed data.Copyright © 2018 OpenDaylight. All rights reserved.