Create (or update an existing) archive in the selected vault. More...
#include <archiver.h>
Public Member Functions | |
archive_manager () | |
C'tor. | |
void | clear (void) |
Clear the archive manager and clear the job list. | |
void | init (void) |
Initialize the archive manager. | |
const bool | initialized (void) const |
Return the initialized status of the archive manager. | |
void | archive (void) |
Archive jobs. | |
const std::string | archive_path (void) const |
Return an absolute path to the finished archive directory. | |
const std::string | working_archive_path (void) const |
Return the absolute path to the unfinished working archive directory. | |
Private Member Functions | |
void | mf_log_status (void) |
Give a status report. | |
Private Attributes | |
std::vector< job_archiver * > | m_jobs |
bool | m_initialized |
Create (or update an existing) archive in the selected vault.
Definition at line 98 of file archiver.h.
archive_manager::archive_manager | ( | ) |
C'tor.
Definition at line 1119 of file archiver.cc.
References archiver, clear(), and INTERNAL_ERROR.
void archive_manager::archive | ( | void | ) |
Archive jobs.
Create an archive directory. Generate a to-do list of job archiver objects. Process the job archiver objects:
Definition at line 1296 of file archiver.cc.
References vault_report::add_report(), jobs_report::add_report(), archive_path(), estring::clear(), config, timer::duration(), err_nomem, err_unknown, exists(), initialized(), INTERNAL_ERROR, report_manager::jobs(), configuration_manager::jobs(), logger, m_jobs, mf_log_status(), mk_dir(), error::num(), vault_manager::overflow(), vault_manager::prepare(), rename_file(), reporter, configuration_manager::rsync_parallel(), timer::start(), job_archiver::status_completed, job_archiver::status_error, job_archiver::status_fatal_error, job_archiver::status_pending, job_archiver::status_processing, job_archiver::status_reschedule, timer::stop(), TRY, TRY_nomem, vault_manager::vault(), report_manager::vault(), vaulter, working_archive_path(), and log_manager::write().
Referenced by main(), and test_rvm().
const std::string archive_manager::archive_path | ( | void | ) | const |
Return an absolute path to the finished archive directory.
Definition at line 1545 of file archiver.cc.
References config, initialized(), INTERNAL_ERROR, timestamp::str(), configuration_manager::timestamp(), vault_manager::vault(), and vaulter.
Referenced by archive(), and working_archive_path().
void archive_manager::clear | ( | void | ) |
Clear the archive manager and clear the job list.
Definition at line 1128 of file archiver.cc.
References m_initialized, and m_jobs.
Referenced by archive_manager(), and test_rvm().
void archive_manager::init | ( | void | ) |
Initialize the archive manager.
Log the archive timestamp, select and prepare a vault.
Definition at line 1139 of file archiver.cc.
References vault_report::add_report(), config, timer::duration(), logger, m_initialized, vault_manager::prepare(), reporter, vault_manager::select(), timer::start(), timer::stop(), timestamp::str(), configuration_manager::timestamp(), report_manager::vault(), vault_manager::vault(), vaulter, and log_manager::write().
Referenced by main(), and test_rvm().
const bool archive_manager::initialized | ( | void | ) | const |
Return the initialized status of the archive manager.
Definition at line 1178 of file archiver.cc.
References m_initialized.
Referenced by archive(), archive_path(), and working_archive_path().
void archive_manager::mf_log_status | ( | void | ) | [private] |
Give a status report.
After so many minutes of inactivity write a report to the log file of our current status of affairs.
Definition at line 1189 of file archiver.cc.
References timer::duration_mins(), timer::is_started(), logger, m_jobs, vault_manager::overflow(), timer::start(), job_archiver::status_completed, job_archiver::status_done, job_archiver::status_error, job_archiver::status_fatal_error, job_archiver::status_pending, job_archiver::status_processing, job_archiver::status_reschedule, timer::stop(), vaulter, and log_manager::write().
Referenced by archive().
const std::string archive_manager::working_archive_path | ( | void | ) | const |
Return the absolute path to the unfinished working archive directory.
Definition at line 1560 of file archiver.cc.
References archive_path(), initialized(), and INTERNAL_ERROR.
Referenced by archive(), job_archiver::mf_do_chores(), and job_archiver::start().
bool archive_manager::m_initialized [private] |
Definition at line 113 of file archiver.h.
Referenced by clear(), init(), and initialized().
std::vector<job_archiver*> archive_manager::m_jobs [private] |
Definition at line 112 of file archiver.h.
Referenced by archive(), clear(), and mf_log_status().