namespace ZB.MOM.WW.OtOpcUa.Runtime.Historian;
/// Rows removed from one historian table by a single purge pass.
/// Unqualified table name (the table tag on the retention counter).
/// Rows deleted.
public sealed record RetentionPurgeResult(string Table, long Rows);
///
/// Backend-side retention purge: deletes history older than the backend's configured retention window.
/// Created by and driven on a timer by
/// , which owns scheduling and the Primary gate.
///
public interface IHistorianRetention
{
/// How often should run a pass.
TimeSpan Interval { get; }
///
/// Runs one purge pass. Returns an empty list when the pass was skipped (another process holds the
/// purge lock). Implementations honour cancellation between batches.
///
/// Cancellation.
/// Per-table deleted-row counts.
Task> PurgeAsync(CancellationToken ct);
}