|
PACS System 0.1.0
PACS DICOM system library
|

Public Member Functions | |
| void | save_config (const sync_config &cfg) |
| std::optional< sync_config > | get_config_from_cache (std::string_view config_id) const |
| void | update_config_stats (std::string_view config_id, bool success, size_t studies_synced) |
| void | mark_sync_active (std::string_view config_id) |
| void | mark_sync_inactive (std::string_view config_id) |
| bool | is_sync_active (std::string_view config_id) const |
| void | store_last_result (const std::string &config_id, const sync_result &result) |
| void | notify_progress (const std::string &config_id, size_t synced, size_t total) |
| void | notify_completion (const std::string &config_id, const sync_result &result) |
| void | notify_conflict (const sync_conflict &conflict) |
| void | add_conflict (const sync_conflict &conflict) |
| sync_result | perform_sync (const sync_config &cfg, bool full_sync) |
| std::vector< std::string > | query_remote_studies (const sync_config &cfg, std::chrono::system_clock::time_point since, sync_result &result) |
| std::vector< sync_conflict > | compare_with_local (const sync_config &cfg, const std::vector< std::string > &remote_study_uids, sync_result &result) |
| void | resolve_conflict_internal (const sync_conflict &conflict, conflict_resolution resolution, sync_result &result) |
| void | scheduler_loop () |
| void | load_configs_from_repo () |
| void | load_conflicts_from_repo () |
Definition at line 79 of file sync_manager.cpp.
|
inline |
Definition at line 264 of file sync_manager.cpp.
References compatibility_repo, conflicts, kcenon::pacs::client::sync_repositories::conflicts, conflicts_mutex, notify_conflict(), repositories, and total_conflicts_detected.
Referenced by perform_sync().


|
inline |
Definition at line 547 of file sync_manager.cpp.
References kcenon::pacs::client::sync_config::config_id, and kcenon::pacs::client::missing_local.
Referenced by kcenon::pacs::client::sync_manager::compare(), and perform_sync().

|
inline |
Definition at line 164 of file sync_manager.cpp.
References configs, and configs_mutex.
Referenced by kcenon::pacs::client::sync_manager::add_config(), kcenon::pacs::client::sync_manager::compare(), kcenon::pacs::client::sync_manager::full_sync(), kcenon::pacs::client::sync_manager::get_config(), kcenon::pacs::client::sync_manager::get_statistics(), kcenon::pacs::client::sync_manager::incremental_sync(), kcenon::pacs::client::sync_manager::sync_now(), and kcenon::pacs::client::sync_manager::update_config().

|
inline |
Definition at line 221 of file sync_manager.cpp.
References active_mutex, and active_sync_config_ids.
Referenced by kcenon::pacs::client::sync_manager::is_syncing(), and scheduler_loop().

|
inline |
Definition at line 666 of file sync_manager.cpp.
References compatibility_repo, configs, kcenon::pacs::client::sync_repositories::configs, configs_mutex, logger, and repositories.
Referenced by kcenon::pacs::client::sync_manager::sync_manager(), and kcenon::pacs::client::sync_manager::sync_manager().

|
inline |
Definition at line 697 of file sync_manager.cpp.
References compatibility_repo, conflicts, kcenon::pacs::client::sync_repositories::conflicts, conflicts_mutex, logger, and repositories.
Referenced by kcenon::pacs::client::sync_manager::sync_manager(), and kcenon::pacs::client::sync_manager::sync_manager().

|
inline |
Definition at line 211 of file sync_manager.cpp.
References active_mutex, and active_sync_config_ids.
Referenced by kcenon::pacs::client::sync_manager::full_sync(), kcenon::pacs::client::sync_manager::incremental_sync(), scheduler_loop(), and kcenon::pacs::client::sync_manager::sync_now().

|
inline |
Definition at line 216 of file sync_manager.cpp.
References active_mutex, and active_sync_config_ids.
Referenced by kcenon::pacs::client::sync_manager::full_sync(), kcenon::pacs::client::sync_manager::incremental_sync(), scheduler_loop(), and kcenon::pacs::client::sync_manager::sync_now().

|
inline |
Definition at line 238 of file sync_manager.cpp.
References callbacks_mutex, completion_callback, completion_promises, kcenon::pacs::client::sync_result::job_id, and promises_mutex.
Referenced by kcenon::pacs::client::sync_manager::full_sync(), kcenon::pacs::client::sync_manager::incremental_sync(), scheduler_loop(), and kcenon::pacs::client::sync_manager::sync_now().

|
inline |
Definition at line 257 of file sync_manager.cpp.
References callbacks_mutex, and conflict_callback.
Referenced by add_conflict().

|
inline |
Definition at line 231 of file sync_manager.cpp.
References callbacks_mutex, and progress_callback.
Referenced by perform_sync().

|
inline |
Definition at line 302 of file sync_manager.cpp.
References add_conflict(), kcenon::pacs::client::sync_manager_config::auto_resolve_conflicts, kcenon::pacs::client::bidirectional, compare_with_local(), compatibility_repo, kcenon::pacs::client::sync_history::completed_at, kcenon::pacs::client::sync_result::completed_at, config, kcenon::pacs::client::sync_config::config_id, kcenon::pacs::client::sync_history::config_id, kcenon::pacs::client::sync_result::config_id, kcenon::pacs::client::sync_result::conflicts, kcenon::pacs::client::sync_history::conflicts_found, kcenon::pacs::client::count_mismatch, kcenon::pacs::client::sync_manager_config::default_resolution, kcenon::pacs::client::sync_config::direction, kcenon::pacs::client::sync_result::elapsed, kcenon::pacs::client::sync_history::errors, kcenon::pacs::client::sync_result::errors, failed_syncs, kcenon::pacs::client::sync_manager::full_sync(), kcenon::pacs::client::sync_repositories::history, kcenon::pacs::client::sync_history::job_id, kcenon::pacs::client::sync_result::job_id, job_mgr, kcenon::pacs::client::sync_config::last_successful_sync, logger, kcenon::pacs::client::sync_config::lookback, kcenon::pacs::client::missing_local, kcenon::pacs::client::missing_remote, kcenon::pacs::client::modified, node_manager, kcenon::pacs::client::normal, notify_progress(), kcenon::pacs::client::pull, kcenon::pacs::client::push, query_remote_studies(), repositories, resolve_conflict_internal(), kcenon::pacs::client::sync_config::source_node_id, kcenon::pacs::client::sync_history::started_at, kcenon::pacs::client::sync_result::started_at, store_last_result(), kcenon::pacs::client::sync_history::studies_checked, kcenon::pacs::client::sync_result::studies_checked, kcenon::pacs::client::sync_history::studies_synced, kcenon::pacs::client::sync_result::studies_synced, kcenon::pacs::client::sync_history::success, kcenon::pacs::client::sync_result::success, successful_syncs, total_studies_synced, total_syncs, and update_config_stats().
Referenced by kcenon::pacs::client::sync_manager::full_sync(), kcenon::pacs::client::sync_manager::incremental_sync(), scheduler_loop(), and kcenon::pacs::client::sync_manager::sync_now().


|
inline |
Definition at line 469 of file sync_manager.cpp.
References kcenon::pacs::encoding::CS, kcenon::pacs::encoding::DA, kcenon::pacs::client::sync_result::errors, kcenon::pacs::services::query_scu::find(), kcenon::pacs::services::query_scu_config::level, logger, kcenon::pacs::client::sync_config::modalities, kcenon::pacs::core::tags::modality, kcenon::pacs::services::query_scu_config::model, node_manager, kcenon::pacs::core::tags::query_retrieve_level, kcenon::pacs::core::dicom_dataset::set_string(), kcenon::pacs::client::sync_config::source_node_id, kcenon::pacs::services::study, kcenon::pacs::core::tags::study_date, kcenon::pacs::core::tags::study_instance_uid, kcenon::pacs::services::study_root, kcenon::pacs::services::study_root_find_sop_class_uid, kcenon::pacs::encoding::UI, and uid.
Referenced by kcenon::pacs::client::sync_manager::compare(), and perform_sync().


|
inline |
Definition at line 575 of file sync_manager.cpp.
References job_mgr, kcenon::pacs::client::normal, kcenon::pacs::client::prefer_local, kcenon::pacs::client::prefer_newer, kcenon::pacs::client::prefer_remote, kcenon::pacs::client::sync_result::studies_skipped, kcenon::pacs::client::sync_result::studies_synced, and total_conflicts_resolved.
Referenced by perform_sync(), and kcenon::pacs::client::sync_manager::resolve_conflict().

|
inline |
Definition at line 137 of file sync_manager.cpp.
References compatibility_repo, configs, kcenon::pacs::client::sync_repositories::configs, configs_mutex, and repositories.
Referenced by kcenon::pacs::client::sync_manager::add_config(), and kcenon::pacs::client::sync_manager::update_config().

|
inline |
Definition at line 620 of file sync_manager.cpp.
References configs, configs_mutex, is_sync_active(), logger, mark_sync_active(), mark_sync_inactive(), notify_completion(), perform_sync(), scheduler_cv, scheduler_mutex, and scheduler_running.
Referenced by kcenon::pacs::client::sync_manager::start_scheduler().


|
inline |
Definition at line 226 of file sync_manager.cpp.
References last_results, and results_mutex.
Referenced by perform_sync().

|
inline |
Definition at line 176 of file sync_manager.cpp.
References compatibility_repo, configs, kcenon::pacs::client::sync_repositories::configs, configs_mutex, and repositories.
Referenced by perform_sync().

|
mutable |
Definition at line 97 of file sync_manager.cpp.
Referenced by is_sync_active(), mark_sync_active(), and mark_sync_inactive().
| std::unordered_set<std::string> kcenon::pacs::client::sync_manager::impl::active_sync_config_ids |
Definition at line 96 of file sync_manager.cpp.
Referenced by is_sync_active(), mark_sync_active(), and mark_sync_inactive().
|
mutable |
Definition at line 117 of file sync_manager.cpp.
Referenced by notify_completion(), notify_conflict(), notify_progress(), kcenon::pacs::client::sync_manager::set_completion_callback(), kcenon::pacs::client::sync_manager::set_conflict_callback(), and kcenon::pacs::client::sync_manager::set_progress_callback().
| std::shared_ptr<storage::sync_repository> kcenon::pacs::client::sync_manager::impl::compatibility_repo |
Definition at line 85 of file sync_manager.cpp.
Referenced by add_conflict(), load_configs_from_repo(), load_conflicts_from_repo(), perform_sync(), kcenon::pacs::client::sync_manager::remove_config(), kcenon::pacs::client::sync_manager::resolve_conflict(), save_config(), kcenon::pacs::client::sync_manager::sync_manager(), and update_config_stats().
| sync_completion_callback kcenon::pacs::client::sync_manager::impl::completion_callback |
Definition at line 115 of file sync_manager.cpp.
Referenced by notify_completion(), and kcenon::pacs::client::sync_manager::set_completion_callback().
| std::unordered_map<std::string, std::shared_ptr<std::promise<sync_result> > > kcenon::pacs::client::sync_manager::impl::completion_promises |
Definition at line 121 of file sync_manager.cpp.
Referenced by notify_completion(), and kcenon::pacs::client::sync_manager::wait_for_sync().
| sync_manager_config kcenon::pacs::client::sync_manager::impl::config |
Definition at line 81 of file sync_manager.cpp.
Referenced by kcenon::pacs::client::sync_manager::config(), perform_sync(), kcenon::pacs::client::sync_manager::sync_manager(), and kcenon::pacs::client::sync_manager::sync_manager().
| std::vector<sync_config> kcenon::pacs::client::sync_manager::impl::configs |
Definition at line 92 of file sync_manager.cpp.
Referenced by get_config_from_cache(), kcenon::pacs::client::sync_manager::list_configs(), load_configs_from_repo(), kcenon::pacs::client::sync_manager::remove_config(), save_config(), scheduler_loop(), and update_config_stats().
|
mutable |
Definition at line 93 of file sync_manager.cpp.
Referenced by get_config_from_cache(), kcenon::pacs::client::sync_manager::list_configs(), load_configs_from_repo(), kcenon::pacs::client::sync_manager::remove_config(), save_config(), scheduler_loop(), and update_config_stats().
| sync_conflict_callback kcenon::pacs::client::sync_manager::impl::conflict_callback |
Definition at line 116 of file sync_manager.cpp.
Referenced by notify_conflict(), and kcenon::pacs::client::sync_manager::set_conflict_callback().
| std::vector<sync_conflict> kcenon::pacs::client::sync_manager::impl::conflicts |
Definition at line 104 of file sync_manager.cpp.
Referenced by add_conflict(), kcenon::pacs::client::sync_manager::get_conflicts(), kcenon::pacs::client::sync_manager::get_conflicts(), kcenon::pacs::client::sync_manager::get_statistics(), load_conflicts_from_repo(), kcenon::pacs::client::sync_manager::resolve_all_conflicts(), and kcenon::pacs::client::sync_manager::resolve_conflict().
|
mutable |
Definition at line 105 of file sync_manager.cpp.
Referenced by add_conflict(), kcenon::pacs::client::sync_manager::get_conflicts(), kcenon::pacs::client::sync_manager::get_conflicts(), kcenon::pacs::client::sync_manager::get_statistics(), load_conflicts_from_repo(), kcenon::pacs::client::sync_manager::resolve_all_conflicts(), and kcenon::pacs::client::sync_manager::resolve_conflict().
| std::atomic<size_t> kcenon::pacs::client::sync_manager::impl::failed_syncs {0} |
Definition at line 127 of file sync_manager.cpp.
Referenced by kcenon::pacs::client::sync_manager::get_statistics(), and perform_sync().
| std::shared_ptr<job_manager> kcenon::pacs::client::sync_manager::impl::job_mgr |
Definition at line 87 of file sync_manager.cpp.
Referenced by perform_sync(), resolve_conflict_internal(), kcenon::pacs::client::sync_manager::sync_manager(), and kcenon::pacs::client::sync_manager::sync_manager().
| std::unordered_map<std::string, sync_result> kcenon::pacs::client::sync_manager::impl::last_results |
Definition at line 100 of file sync_manager.cpp.
Referenced by kcenon::pacs::client::sync_manager::get_last_result(), and store_last_result().
| std::shared_ptr<di::ILogger> kcenon::pacs::client::sync_manager::impl::logger |
Definition at line 89 of file sync_manager.cpp.
Referenced by kcenon::pacs::client::sync_manager::add_config(), load_configs_from_repo(), load_conflicts_from_repo(), perform_sync(), query_remote_studies(), kcenon::pacs::client::sync_manager::remove_config(), kcenon::pacs::client::sync_manager::resolve_all_conflicts(), kcenon::pacs::client::sync_manager::resolve_conflict(), scheduler_loop(), kcenon::pacs::client::sync_manager::start_scheduler(), kcenon::pacs::client::sync_manager::stop_scheduler(), kcenon::pacs::client::sync_manager::sync_manager(), kcenon::pacs::client::sync_manager::sync_manager(), and kcenon::pacs::client::sync_manager::update_config().
| std::shared_ptr<remote_node_manager> kcenon::pacs::client::sync_manager::impl::node_manager |
Definition at line 86 of file sync_manager.cpp.
Referenced by perform_sync(), query_remote_studies(), kcenon::pacs::client::sync_manager::sync_manager(), and kcenon::pacs::client::sync_manager::sync_manager().
| sync_progress_callback kcenon::pacs::client::sync_manager::impl::progress_callback |
Definition at line 114 of file sync_manager.cpp.
Referenced by notify_progress(), and kcenon::pacs::client::sync_manager::set_progress_callback().
|
mutable |
Definition at line 122 of file sync_manager.cpp.
Referenced by notify_completion(), and kcenon::pacs::client::sync_manager::wait_for_sync().
| std::shared_ptr<services::query_scu> kcenon::pacs::client::sync_manager::impl::query_scu |
Definition at line 88 of file sync_manager.cpp.
Referenced by kcenon::pacs::client::sync_manager::sync_manager(), and kcenon::pacs::client::sync_manager::sync_manager().
| sync_repositories kcenon::pacs::client::sync_manager::impl::repositories |
Definition at line 84 of file sync_manager.cpp.
Referenced by add_conflict(), load_configs_from_repo(), load_conflicts_from_repo(), perform_sync(), kcenon::pacs::client::sync_manager::remove_config(), kcenon::pacs::client::sync_manager::resolve_conflict(), save_config(), kcenon::pacs::client::sync_manager::sync_manager(), and update_config_stats().
|
mutable |
Definition at line 101 of file sync_manager.cpp.
Referenced by kcenon::pacs::client::sync_manager::get_last_result(), and store_last_result().
| std::condition_variable kcenon::pacs::client::sync_manager::impl::scheduler_cv |
Definition at line 110 of file sync_manager.cpp.
Referenced by scheduler_loop(), and kcenon::pacs::client::sync_manager::stop_scheduler().
| std::mutex kcenon::pacs::client::sync_manager::impl::scheduler_mutex |
Definition at line 111 of file sync_manager.cpp.
Referenced by scheduler_loop().
| std::atomic<bool> kcenon::pacs::client::sync_manager::impl::scheduler_running {false} |
Definition at line 109 of file sync_manager.cpp.
Referenced by kcenon::pacs::client::sync_manager::is_scheduler_running(), scheduler_loop(), kcenon::pacs::client::sync_manager::start_scheduler(), and kcenon::pacs::client::sync_manager::stop_scheduler().
| std::thread kcenon::pacs::client::sync_manager::impl::scheduler_thread |
Definition at line 108 of file sync_manager.cpp.
Referenced by kcenon::pacs::client::sync_manager::start_scheduler(), and kcenon::pacs::client::sync_manager::stop_scheduler().
| std::atomic<size_t> kcenon::pacs::client::sync_manager::impl::successful_syncs {0} |
Definition at line 126 of file sync_manager.cpp.
Referenced by kcenon::pacs::client::sync_manager::get_statistics(), and perform_sync().
| std::atomic<size_t> kcenon::pacs::client::sync_manager::impl::total_bytes_transferred {0} |
Definition at line 129 of file sync_manager.cpp.
Referenced by kcenon::pacs::client::sync_manager::get_statistics().
| std::atomic<size_t> kcenon::pacs::client::sync_manager::impl::total_conflicts_detected {0} |
Definition at line 130 of file sync_manager.cpp.
Referenced by add_conflict(), and kcenon::pacs::client::sync_manager::get_statistics().
| std::atomic<size_t> kcenon::pacs::client::sync_manager::impl::total_conflicts_resolved {0} |
Definition at line 131 of file sync_manager.cpp.
Referenced by kcenon::pacs::client::sync_manager::get_statistics(), and resolve_conflict_internal().
| std::atomic<size_t> kcenon::pacs::client::sync_manager::impl::total_studies_synced {0} |
Definition at line 128 of file sync_manager.cpp.
Referenced by kcenon::pacs::client::sync_manager::get_statistics(), and perform_sync().
| std::atomic<size_t> kcenon::pacs::client::sync_manager::impl::total_syncs {0} |
Definition at line 125 of file sync_manager.cpp.
Referenced by kcenon::pacs::client::sync_manager::get_statistics(), and perform_sync().