|
DUNE-DAQ
DUNE Trigger and Data Acquisition software
|
#include <dbcontroller.hpp>
Static Public Member Functions | |
| static configobject::tref | get (dbe::cokey const &desc) |
| static std::vector< configobject::tref > | gets (std::string const &cname, std::string const &query="") |
| static configobject::tref | create_object_request (dbe::t_config_object_preimage const &rep) |
| template<typename T> | |
| static configobject::tref | create_object_request (configobject::aref< T > const &obj) |
| template<typename T> | |
| static configobject::tref | create_object_request (configobject::gref< T > const &objref) |
| template<typename T> | |
| static configobject::tref | create_object_request (configobject::gref< T > &objref, typename configobject::gref< T >::config_action_notifiable notice) |
| template<typename T> | |
| static configobject::gref< T > | delete_object_request (configobject::tref const &obj) |
| template<typename T> | |
| static configobject::gref< T > | delete_object_request (configobject::tref const &obj, typename configobject::gref< T >::config_action_notifiable notice) |
| static configobject::tref | move_object_request (configobject::tref objref, std::string const &destfile) |
| static configobject::tref | rename_object_request (configobject::tref objref, std::string const &newname) |
| static void | flush () |
Private Types | |
| typedef dbe::cokey | t_object_key |
| typedef std::shared_ptr< configobject::oref > | t_object_handle |
| typedef std::unordered_map< t_object_key, t_object_handle, configobject::refhasher > | t_object_map |
| typedef std::recursive_mutex | t_mutex |
| typedef std::lock_guard< t_mutex > | locker |
Private Member Functions | |
| configobject::tref | insert (dunedaq::conffwk::ConfigObject const &) |
| configobject::tref | lookup (dbe::cokey const &desc) |
| configobject::tref | rename (configobject::tref objref, std::string const &aname) |
| template<typename T> | |
| configobject::gref< T > | remove (dbe::tref ref) |
| std::vector< configobject::tref > | referenced_by (configobject::tref objref, std::string const &name="*", bool check_composite_only=true) |
| dbcontroller () | |
| dbcontroller (dbcontroller const &)=delete | |
| dbcontroller & | operator= (dbcontroller const &)=delete |
Static Private Member Functions | |
| static dbcontroller & | ref () |
Private Attributes | |
| t_object_map | this_allobjects |
Static Private Attributes | |
| static t_mutex | this_lock |
Friends | |
| class | configobject::tref |
Definition at line 29 of file dbcontroller.hpp.
|
private |
Definition at line 187 of file dbcontroller.hpp.
|
private |
Definition at line 186 of file dbcontroller.hpp.
|
private |
Definition at line 126 of file dbcontroller.hpp.
|
private |
Definition at line 125 of file dbcontroller.hpp.
|
private |
Definition at line 128 of file dbcontroller.hpp.
|
privatedefault |
|
privatedelete |
|
static |
creates an object to the database that is described from an aref
| obj | is an aref of an object, based on which the object is put onto the database |
Definition at line 302 of file dbcontroller.cpp.
|
static |
Definition at line 314 of file dbcontroller.cpp.
|
static |
Create an object in the database by first creating its associated subgraph as described in a gref
| objref | is the graph reference (gref) to the object |
Definition at line 308 of file dbcontroller.cpp.
|
static |
Create a new configuration object from its representation
| rep | is the representation, with attributes and relations included |
Definition at line 276 of file dbcontroller.cpp.
|
static |
removes object from the database and returns an aref of the object before copying
| obj | is a tref to the object that must be removed from the database |
|
static |
Definition at line 249 of file dbcontroller.cpp.
|
static |
Empties the internal cache and sets all associated objects to destroyed This results in all previously held references to be set to null
Definition at line 212 of file dbcontroller.cpp.
|
static |
Retrieve an object from the database, and empty reference is retrieved if the object cannot be found in the database
| desc | is a description of the object to be searched for in the database |
Definition at line 388 of file dbcontroller.cpp.
|
static |
Retrieve all objects from the database of a specific class
| cname | is the class name for which to retrieve classes |
Definition at line 393 of file dbcontroller.cpp.
|
private |
Insert or replace a ConfigObject into the internal store
| the | configuration object to insert, actually makes a copy of it |
Definition at line 444 of file dbcontroller.cpp.
|
private |
Searches for an object matching the criteria in the underlying database connection and then updates the internal map by comparing if it should be removed. All references to the object are transparently updated. If this cannot be done then they are replaced
| the | configuration object to lookup for in the cache and the database |
Definition at line 418 of file dbcontroller.cpp.
|
static |
Move an object to a new database file
| objref | is the tref of the associated ConfigObject to be moved to a new database file |
| destfile | is the destination file where this object must be moved to |
Definition at line 330 of file dbcontroller.cpp.
|
privatedelete |
|
staticprivate |
|
private |
Return a list of references to the objects in the database that reference and object
| objref | the tref to the object for which references are to be retrieved |
| name | the name of the relation for which references are to be retrieved |
| check_composite_only | return only composite connections |
Definition at line 221 of file dbcontroller.cpp.
|
private |
Takes care of removing an object from the underlying implementation and setting all held references to it null . Performs check for derived objects having be removed.
| the | configobject to remove from the underlying database |
Definition at line 467 of file dbcontroller.cpp.
|
private |
Rename an object and update the internal cache
| objref | |
| newname |
Definition at line 351 of file dbcontroller.cpp.
|
static |
Rename an object in the database
| objref | is a tref to the current object |
| newname | is the new name of the object |
Definition at line 343 of file dbcontroller.cpp.
|
friend |
Definition at line 194 of file dbcontroller.hpp.
|
private |
Definition at line 184 of file dbcontroller.hpp.
|
staticprivate |
Definition at line 188 of file dbcontroller.hpp.