PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
study_lock_manager.h File Reference

Study lock manager for modification control and concurrent access. More...

#include <atomic>
#include <chrono>
#include <cstdint>
#include <functional>
#include <map>
#include <memory>
#include <mutex>
#include <optional>
#include <shared_mutex>
#include <string>
#include <vector>
Include dependency graph for study_lock_manager.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  kcenon::pacs::workflow::lock_token
 Unique identifier for a lock. More...
 
struct  kcenon::pacs::workflow::lock_info
 Detailed information about a lock on a study. More...
 
struct  kcenon::pacs::workflow::study_lock_manager_config
 Configuration for the study lock manager. More...
 
struct  kcenon::pacs::workflow::lock_manager_stats
 Statistics for lock manager operations. More...
 
class  kcenon::pacs::workflow::study_lock_manager
 Manages locks on DICOM studies for concurrent access control. More...
 
struct  kcenon::pacs::workflow::study_lock_manager::lock_entry
 

Namespaces

namespace  kcenon
 
namespace  kcenon::common
 
namespace  kcenon::pacs
 
namespace  kcenon::pacs::workflow
 
namespace  kcenon::pacs::workflow::lock_error
 Error codes for lock operations.
 

Enumerations

enum class  kcenon::pacs::workflow::lock_type { kcenon::pacs::workflow::exclusive , kcenon::pacs::workflow::shared , kcenon::pacs::workflow::migration }
 Type of lock to acquire on a study. More...
 

Functions

auto kcenon::pacs::workflow::to_string (lock_type type) -> std::string
 Convert lock_type to string.
 
auto kcenon::pacs::workflow::parse_lock_type (const std::string &str) -> std::optional< lock_type >
 Parse lock_type from string.
 

Variables

constexpr int kcenon::pacs::workflow::lock_error::already_locked = -100
 Lock already held by another holder.
 
constexpr int kcenon::pacs::workflow::lock_error::not_found = -101
 Lock not found.
 
constexpr int kcenon::pacs::workflow::lock_error::invalid_token = -102
 Invalid token.
 
constexpr int kcenon::pacs::workflow::lock_error::timeout = -103
 Lock timeout exceeded.
 
constexpr int kcenon::pacs::workflow::lock_error::expired = -104
 Lock has expired.
 
constexpr int kcenon::pacs::workflow::lock_error::permission_denied = -105
 Permission denied (force unlock not allowed)
 
constexpr int kcenon::pacs::workflow::lock_error::invalid_type = -106
 Invalid lock type.
 
constexpr int kcenon::pacs::workflow::lock_error::max_shared_exceeded = -107
 Maximum shared locks exceeded.
 
constexpr int kcenon::pacs::workflow::lock_error::upgrade_failed = -108
 Cannot upgrade lock (shared to exclusive)
 

Detailed Description

Study lock manager for modification control and concurrent access.

This file provides the study_lock_manager class which manages locks on DICOM studies to prevent concurrent modifications and ensure data integrity during operations like migrations and updates.

See also
SRS-WKF-003 - Study Lock Manager Specification
FR-4.8 - Study Modification Control
Author
kcenon
Since
1.0.0

Definition in file study_lock_manager.h.