New ConfigActions Class
An action is called on database load/reload/unload operation or config
object modification.
As an example
it is used to implement DAL's Component::disabled() algorithm in a way
transparent to users (the disabled() algorithm holds static set, that
needs to be updated in case of database modification).
To add an action user has to:
- implement new class deriving from ConfigAction class (defined in the
config/ConfigAction.h for C++ and config/jsrc/config/ConfigAction.java
for Java)
- create new action object and register it using Configuration::add_config_action(ConfigAction * ac)
method in C++ or config.Configuration.add_config_action(config.ConfigAction
obj) in Java
Unread All Template Objects (C++)
Add method Configuration::unread_all_objects() to unread all template
objects.
As an example
it is used when attribute string converter reads many template objects
(partition, segments, resources, applications, sw repositories) while
builds conversion map. All such objects have to be unread after
conversion map has been built, since their attributes may have
variables also need to be converted.
Existing unread_objects() method was replaced by
_unread_objects(CacheBase*) to be effectively used by the new
unread_all_objects().
Thread Safe (C++)
As required by new RunControl accessing DAL objects simultaneously from
several threads, the config and generated code has been made
thread-safe.
Performance Improvements and API Changes (C++)
Improve performance of most DAL methods replacing STL set and map by
GNU hash_set and hash_map.
Above requires changes in code using Configuration superclasses() and subclasses() methods:
Old methods:
- const std::map<std::string, std::set<std::string>
>& superclasses() const throw ()
- const std::map<std::string, std::set<std::string>
>& subclasses() const
New methods:
- const config::map<config::set>& superclasses()
const throw ()
- const config::map<config::set>& subclasses()
const
See config/map.h and config/set.h for more information about config::map and config::set classes.
Note, new methods return unordered data.