|
Lightweight 0.20260625.0
|
The interface for progress updates. More...
#include <SqlBackup.hpp>
Public Member Functions | |
| ProgressManager ()=default | |
| Default constructor. | |
| ProgressManager (ProgressManager const &)=default | |
| Default copy constructor. | |
| ProgressManager & | operator= (ProgressManager const &)=default |
| Default copy assignment operator. | |
| ProgressManager (ProgressManager &&)=default | |
| Default move constructor. | |
| ProgressManager & | operator= (ProgressManager &&)=default |
| Default move assignment operator. | |
| virtual void | Update (Progress const &p)=0 |
| Gets called when the progress of an individual backup/restore operation changes. | |
| virtual void | AllDone ()=0 |
| Gets called when all backup/restore operations are finished. | |
| virtual void | SetMaxTableNameLength (size_t) |
| virtual size_t | ErrorCount () const noexcept |
| Returns the number of errors encountered during the operation. | |
| virtual void | SetTotalItems (size_t totalItems) |
| virtual void | AddTotalItems (size_t additionalItems) |
| virtual void | OnItemsProcessed (size_t count) |
| virtual void | SetTotalTables (size_t totalTables) |
The interface for progress updates.
Definition at line 188 of file SqlBackup.hpp.
|
pure virtual |
Gets called when the progress of an individual backup/restore operation changes.
Implemented in Lightweight::SqlBackup::ErrorTrackingProgressManager.
|
inlinevirtual |
Sets the maximum length of a table name. This is used to align the output of the progress manager.
Definition at line 210 of file SqlBackup.hpp.
|
inlinevirtualnoexcept |
Returns the number of errors encountered during the operation.
Reimplemented in Lightweight::SqlBackup::ErrorTrackingProgressManager.
Definition at line 213 of file SqlBackup.hpp.
|
inlinevirtual |
Sets the total number of items to be processed (for ETA calculation).
| totalItems | Total number of items (rows) to process across all tables. |
Definition at line 220 of file SqlBackup.hpp.
|
inlinevirtual |
Adds to the total number of items for progressive ETA calculation. This is called as row counts become available during parallel counting.
| additionalItems | Number of additional items (rows) to add to the total. |
Definition at line 228 of file SqlBackup.hpp.
|
inlinevirtual |
Called when items are processed (for rate and ETA calculation).
| count | Number of items (rows) just processed. |
Definition at line 235 of file SqlBackup.hpp.
|
inlinevirtual |
Announces how many tables the operation will process, once, before any per-table Update() is emitted.
Backup knows the complete table set after its schema scan and Restore after reading the archive manifest, i.e. both know the denominator before any data moves. Without this hook a consumer can only count the distinct table names it has seen so far, so a progress readout of the form "processed / total" has a total that climbs as tables are discovered — the GUI's per-table panel showed "12 / 12" then "12 / 47" then "12 / 700" on the same run, which reads as the job getting bigger rather than as progress being made.
| totalTables | Number of tables that will be processed. |
Definition at line 253 of file SqlBackup.hpp.