72 -> std::optional<storage_tier> {
151 std::chrono::system_clock::now()};
170 [[nodiscard]]
auto age() const -> std::chrono::system_clock::duration {
171 return std::chrono::system_clock::now() -
stored_at;
179 -> std::chrono::system_clock::duration {
209 return time_inactive >= policy.hot_to_warm;
214 return time_inactive >= policy.warm_to_cold;
220 return time_inactive >= (policy.hot_to_warm + policy.warm_to_cold);
constexpr auto storage_tier_from_string(std::string_view str) -> std::optional< storage_tier >
Parse storage_tier from string.
storage_tier
Storage tier classification.
@ 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)
auto to_string(annotation_type type) -> std::string
Convert annotation_type to string.
Combined statistics for all HSM tiers.
tier_statistics cold
Statistics for cold tier.
auto total_bytes() const noexcept -> std::size_t
Get total bytes across all tiers.
tier_statistics warm
Statistics for warm tier.
tier_statistics hot
Statistics for hot tier.
auto total_instances() const noexcept -> std::size_t
Get total instance count across all tiers.
Result of a migration operation.
std::chrono::milliseconds duration
Duration of the migration operation.
std::size_t bytes_migrated
Total bytes migrated.
auto is_success() const noexcept -> bool
Check if the migration was completely successful.
std::size_t instances_migrated
Number of instances successfully migrated.
std::size_t instances_skipped
Number of instances that were skipped (not eligible)
std::vector< std::string > failed_uids
SOP Instance UIDs that failed to migrate.
auto total_processed() const noexcept -> std::size_t
Get the total number of instances processed.
std::chrono::days hot_to_warm
Time threshold for migrating from hot to warm tier Default: 30 days.
auto operator==(const tier_policy &other) const noexcept -> bool=default
Check if two policies are equal.
std::size_t max_bytes_per_cycle
Maximum bytes to migrate per cycle Default: 10 GB.
std::chrono::days warm_to_cold
Time threshold for migrating from warm to cold tier Default: 365 days (1 year)
std::size_t min_migration_size
Minimum size in bytes for an instance to be considered for migration Smaller instances may not be wor...
bool auto_migrate
Enable automatic background migration When false, migration must be triggered manually.
std::size_t max_instances_per_cycle
Maximum number of instances to migrate per cycle Prevents overwhelming the storage system Default: 10...
Statistics for a single storage tier.
std::size_t instance_count
Number of instances in this tier.
std::size_t series_count
Number of unique series in this tier.
std::size_t total_bytes
Total bytes stored in this tier.
std::size_t study_count
Number of unique studies in this tier.