Lightweight 0.20251202.0
Loading...
Searching...
No Matches
Lightweight::SqlBackup::ProgressManager Struct Referenceabstract

The interface for progress updates. More...

#include <SqlBackup.hpp>

Inheritance diagram for Lightweight::SqlBackup::ProgressManager:
Lightweight::SqlBackup::ErrorTrackingProgressManager

Public Member Functions

 ProgressManager (ProgressManager const &)=default
 
ProgressManageroperator= (ProgressManager const &)=default
 
 ProgressManager (ProgressManager &&)=default
 
ProgressManageroperator= (ProgressManager &&)=default
 
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)
 
virtual void AddTotalItems (size_t)
 
virtual void OnItemsProcessed (size_t)
 

Detailed Description

The interface for progress updates.

Definition at line 172 of file SqlBackup.hpp.

Member Function Documentation

◆ Update()

virtual void Lightweight::SqlBackup::ProgressManager::Update ( Progress const &  p)
pure virtual

Gets called when the progress of an individual backup/restore operation changes.

Implemented in Lightweight::SqlBackup::ErrorTrackingProgressManager.

◆ SetMaxTableNameLength()

virtual void Lightweight::SqlBackup::ProgressManager::SetMaxTableNameLength ( size_t  )
inlinevirtual

Sets the maximum length of a table name. This is used to align the output of the progress manager.

Definition at line 189 of file SqlBackup.hpp.

◆ ErrorCount()

virtual size_t Lightweight::SqlBackup::ProgressManager::ErrorCount ( ) const
inlinevirtualnoexcept

Returns the number of errors encountered during the operation.

Reimplemented in Lightweight::SqlBackup::ErrorTrackingProgressManager.

Definition at line 192 of file SqlBackup.hpp.

◆ SetTotalItems()

virtual void Lightweight::SqlBackup::ProgressManager::SetTotalItems ( size_t  )
inlinevirtual

Sets the total number of items to be processed (for ETA calculation).

Parameters
totalItemsTotal number of items (rows) to process across all tables.

Definition at line 199 of file SqlBackup.hpp.

◆ AddTotalItems()

virtual void Lightweight::SqlBackup::ProgressManager::AddTotalItems ( size_t  )
inlinevirtual

Adds to the total number of items for progressive ETA calculation. This is called as row counts become available during parallel counting.

Parameters
additionalItemsNumber of additional items (rows) to add to the total.

Definition at line 204 of file SqlBackup.hpp.

◆ OnItemsProcessed()

virtual void Lightweight::SqlBackup::ProgressManager::OnItemsProcessed ( size_t  )
inlinevirtual

Called when items are processed (for rate and ETA calculation).

Parameters
countNumber of items (rows) just processed.

Definition at line 208 of file SqlBackup.hpp.


The documentation for this struct was generated from the following file: