archive_manager Class Reference

Create (or update an existing) archive in the selected vault. More...

#include <archiver.h>

List of all members.

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


Detailed Description

Create (or update an existing) archive in the selected vault.

Definition at line 96 of file archiver.h.


Constructor & Destructor Documentation

archive_manager::archive_manager (  ) 

C'tor.

Definition at line 1057 of file archiver.cc.

References archiver, clear(), and INTERNAL_ERROR.

Here is the call graph for this function:


Member Function Documentation

void archive_manager::clear ( void   ) 

Clear the archive manager and clear the job list.

Definition at line 1066 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 1077 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().

Here is the call graph for this function:

const bool archive_manager::initialized ( void   )  const

Return the initialized status of the archive manager.

Definition at line 1116 of file archiver.cc.

References m_initialized.

Referenced by archive(), archive_path(), and working_archive_path().

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 1234 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().

Here is the call graph for this function:

const std::string archive_manager::archive_path ( void   )  const

Return an absolute path to the finished archive directory.

Definition at line 1483 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().

Here is the call graph for this function:

const std::string archive_manager::working_archive_path ( void   )  const

Return the absolute path to the unfinished working archive directory.

Definition at line 1498 of file archiver.cc.

References archive_path(), initialized(), and INTERNAL_ERROR.

Referenced by archive(), and job_archiver::mf_do_chores().

Here is the call graph for this function:

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 1127 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().

Here is the call graph for this function:


Member Data Documentation

std::vector<job_archiver*> archive_manager::m_jobs [private]

Definition at line 110 of file archiver.h.

Referenced by archive(), clear(), and mf_log_status().

bool archive_manager::m_initialized [private]

Definition at line 111 of file archiver.h.

Referenced by clear(), init(), and initialized().


The documentation for this class was generated from the following files:
Generated on Tue Jul 1 12:11:15 2008 for rvm by  doxygen 1.5.1