PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
kcenon::pacs::storage::tier_policy Struct Reference

Tier migration policy configuration. More...

#include <hsm_types.h>

Collaboration diagram for kcenon::pacs::storage::tier_policy:
Collaboration graph

Public Member Functions

auto operator== (const tier_policy &other) const noexcept -> bool=default
 Check if two policies are equal.
 

Public Attributes

std::chrono::days hot_to_warm {30}
 Time threshold for migrating from hot to warm tier Default: 30 days.
 
std::chrono::days warm_to_cold {365}
 Time threshold for migrating from warm to cold tier Default: 365 days (1 year)
 
bool auto_migrate {true}
 Enable automatic background migration When false, migration must be triggered manually.
 
std::size_t min_migration_size {0}
 Minimum size in bytes for an instance to be considered for migration Smaller instances may not be worth the overhead of migration Default: 0 (no minimum)
 
std::size_t max_instances_per_cycle {100}
 Maximum number of instances to migrate per cycle Prevents overwhelming the storage system Default: 100.
 
std::size_t max_bytes_per_cycle {10ULL * 1024 * 1024 * 1024}
 Maximum bytes to migrate per cycle Default: 10 GB.
 

Detailed Description

Tier migration policy configuration.

Defines the rules for automatic migration between storage tiers. Instances are migrated based on their age (time since last access or storage).

Example:
tier_policy policy;
policy.hot_to_warm = std::chrono::days{30}; // Move to warm after 30 days
policy.warm_to_cold = std::chrono::days{365}; // Move to cold after 1 year
policy.auto_migrate = true; // Enable automatic migration
hsm_storage storage{hot, warm, cold};
storage.set_tier_policy(policy);
@ hot
Hot tier - Recent, frequently accessed data (SSD/NVMe)
@ cold
Cold tier - Archive, rarely accessed data (S3/Glacier)
@ warm
Warm tier - Older, occasionally accessed data (HDD)
Tier migration policy configuration.
Definition hsm_types.h:102
std::chrono::days hot_to_warm
Time threshold for migrating from hot to warm tier Default: 30 days.
Definition hsm_types.h:105
std::chrono::days warm_to_cold
Time threshold for migrating from warm to cold tier Default: 365 days (1 year)
Definition hsm_types.h:109
bool auto_migrate
Enable automatic background migration When false, migration must be triggered manually.
Definition hsm_types.h:113

Definition at line 102 of file hsm_types.h.

Member Function Documentation

◆ operator==()

auto kcenon::pacs::storage::tier_policy::operator== ( const tier_policy & other) const -> bool=default
nodiscarddefaultnoexcept

Check if two policies are equal.

Member Data Documentation

◆ auto_migrate

bool kcenon::pacs::storage::tier_policy::auto_migrate {true}

Enable automatic background migration When false, migration must be triggered manually.

Definition at line 113 of file hsm_types.h.

113{true};

◆ hot_to_warm

std::chrono::days kcenon::pacs::storage::tier_policy::hot_to_warm {30}

Time threshold for migrating from hot to warm tier Default: 30 days.

Definition at line 105 of file hsm_types.h.

105{30};

◆ max_bytes_per_cycle

std::size_t kcenon::pacs::storage::tier_policy::max_bytes_per_cycle {10ULL * 1024 * 1024 * 1024}

Maximum bytes to migrate per cycle Default: 10 GB.

Definition at line 127 of file hsm_types.h.

127{10ULL * 1024 * 1024 * 1024};

◆ max_instances_per_cycle

std::size_t kcenon::pacs::storage::tier_policy::max_instances_per_cycle {100}

Maximum number of instances to migrate per cycle Prevents overwhelming the storage system Default: 100.

Definition at line 123 of file hsm_types.h.

123{100};

◆ min_migration_size

std::size_t kcenon::pacs::storage::tier_policy::min_migration_size {0}

Minimum size in bytes for an instance to be considered for migration Smaller instances may not be worth the overhead of migration Default: 0 (no minimum)

Definition at line 118 of file hsm_types.h.

118{0};

◆ warm_to_cold

std::chrono::days kcenon::pacs::storage::tier_policy::warm_to_cold {365}

Time threshold for migrating from warm to cold tier Default: 365 days (1 year)

Definition at line 109 of file hsm_types.h.

109{365};

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