7#ifndef LEGAL_LOG_MGR_FACTORY_H
8#define LEGAL_LOG_MGR_FACTORY_H
13#include <boost/noncopyable.hpp>
14#include <boost/scoped_ptr.hpp>
42 typedef std::function<std::string ()> DBVersion;
59 const Factory& factory,
61 DBVersion db_version = DBVersion());
131 static bool delBackend(
const std::string& db_type,
133 bool if_unusable =
false);
147 bool if_unusable =
false);
195 static std::map<std::string, std::pair<LegalLogMgrFactory::Factory, LegalLogMgrFactory::DBVersion>>
map_;
std::map< std::string, std::string > ParameterMap
Database configuration parameter map.
static std::map< std::string, std::pair< LegalLogMgrFactory::Factory, LegalLogMgrFactory::DBVersion > > map_
A map holding registered backend factory functions.
static bool unregisterBackendFactory(const std::string &db_type, bool no_log=false)
Unregisters the backend factory function for a given backend type.
static void addBackend(db::DatabaseConnection::ParameterMap ¶meters, ManagerID id=0)
Create an instance of a forensic log backend.
static void delAllBackends()
Removes all backends from the pool.
static bool registerBackendFactory(const std::string &db_type, const Factory &factory, bool no_log=false, DBVersion db_version=DBVersion())
Registers new backend factory function for a given backend type.
static LegalLogMgrPool pool_
Pointer to the forensic log backends pool.
static isc::db::DatabaseConnection::ParameterMap getParameters(ManagerID id=0)
Gets the forensic backend manager parameters.
static void setIOService(isc::asiolink::IOServicePtr io_service)
Set the hook I/O service.
static void logRegistered()
Logs out all registered backends.
static bool delBackend(const std::string &db_type, db::DatabaseConnection::ParameterMap ¶meters, bool if_unusable=false)
Delete a forensic backend manager.
static bool registeredFactory(const std::string &db_type)
Check if a backend store factory was registered.
static LegalLogMgrPtr & instance(ManagerID id=0)
Returns the forensic backend manager with specified ID.
static LegalLogMgrPool getPool()
Returns underlying forensic log backend pool.
static std::list< std::string > getDBVersions()
Return extended version info for registered backends.
static bool haveInstance(std::string type)
Returns true is respective backend store is present, false otherwise.
static void setParameters(isc::db::DatabaseConnection::ParameterMap parameters, ManagerID id=0)
Sets the forensic backend manager parameters.
static isc::asiolink::IOServicePtr getIOService()
Get the hook I/O service.
static isc::asiolink::IOServicePtr io_service_
The hook I/O service.
Defines the abstract class for backend stores.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
boost::shared_ptr< LegalLogMgr > LegalLogMgrPtr
Defines a smart pointer to a LegalLogMgr.
std::map< ManagerID, std::pair< isc::db::DatabaseConnection::ParameterMap, LegalLogMgrPtr > > LegalLogMgrPool
LegalLogMgr pool.
uint64_t ManagerID
Manger ID used by hook libraries to retrieve respective LegalLogMgr instance.
Defines the logger used by the top-level component of kea-lfc.