This can be implemented by components that support adjusting their configuration dynamically.
See {@link ConfRegistry#addListener}.
Just as a reminder, and as explained at {@link ConfRegistry}, each path-addressed node in the configuration tree can both contain a {@link org.lilyproject.conf.Conf Conf} and can have children.
About the change types:
CONF_CHANGE: listen for changes to Conf's, includes new, updated and deleted confs. So if you get a change event and then try to retrieve the changed config, it might fail because it has been deleted.
PATH_CHANGE: listen for additions and removals of new Conf's below a path. Addition and removal of child-paths which do not have Conf but are only a path-segment for lower-level Conf's will not get reported. Maybe it is easier to comprehend this using filesystem terminology: changes for a directory are only reported when files in that directory are added or deleted, not when subdirectories are added or deleted. Updates to files in a directory are not reported as changes either, only file additions and removals are counted as changes. Note that compared to a filesystem, each node in the configuration tree can both be 'file' and 'directory', i.e. can contain a Conf and have children.
|
|