#include <BackupFactory.h>
Inheritance diagram for LiveSupport::Scheduler::BackupFactory:
Backup objects are objects which implement the BackupInterface interface, so they can create and restore schedule backups.
This object has to be configured with an element that contains the configuration element that the factory should build. Currently only PostgresqlBackup is supported by this factory.
An example configuration element is the following:
<backupFactory>
<postgresqlBackup/>
</backupFactory>
The DTD for the above element is:
<!ELEMENT backupFactory (postgresqlBackup) >
For details on the <postgresqlBackup> element, see the PostgresqlBackup documentation.
Definition at line 90 of file BackupFactory.h.
Public Member Functions | |
virtual | ~BackupFactory (void) throw () |
A virtual destructor, as this class has virtual functions. | |
virtual void | configure (const xmlpp::Element &element) throw (std::invalid_argument, std::logic_error) |
Configure the object based on the XML element supplied. | |
Ptr< BackupInterface >::Ref | getBackup (void) throw () |
Return a backup. | |
Static Public Member Functions | |
static const std::string | getConfigElementName (void) throw () |
Return the name of the XML element this object expects to be sent to a call to configure(). | |
static Ptr< BackupFactory >::Ref | getInstance () throw () |
Returns the singleton instance of this object. |
virtual LiveSupport::Scheduler::BackupFactory::~BackupFactory | ( | void | ) | throw () [inline, virtual] |
A virtual destructor, as this class has virtual functions.
Definition at line 121 of file BackupFactory.h.
void BackupFactory::configure | ( | const xmlpp::Element & | element | ) | throw (std::invalid_argument, std::logic_error) [virtual] |
Configure the object based on the XML element supplied.
element | the XML element to configure the object from. |
std::invalid_argument | if the supplied XML element contains bad configuraiton information | |
std::logic_error | if the object has already been configured, and can not be reconfigured. |
Implements LiveSupport::Core::Configurable.
Definition at line 83 of file BackupFactory.cxx.
References LiveSupport::Scheduler::PostgresqlBackup::getConfigElementName(), LiveSupport::Scheduler::ScheduleFactory::getInstance(), LiveSupport::StorageClient::StorageClientFactory::getInstance(), and LiveSupport::Db::ConnectionManagerFactory::getInstance().
Ptr<BackupInterface>::Ref LiveSupport::Scheduler::BackupFactory::getBackup | ( | void | ) | throw () [inline] |
Return a backup.
Definition at line 166 of file BackupFactory.h.
static const std::string LiveSupport::Scheduler::BackupFactory::getConfigElementName | ( | void | ) | throw () [inline, static] |
Return the name of the XML element this object expects to be sent to a call to configure().
Definition at line 132 of file BackupFactory.h.
Referenced by LiveSupport::Scheduler::SchedulerDaemon::configure().
Ptr< BackupFactory >::Ref BackupFactory::getInstance | ( | ) | throw () [static] |
Returns the singleton instance of this object.
Definition at line 69 of file BackupFactory.cxx.
Referenced by LiveSupport::Scheduler::SchedulerDaemon::configure().