using System; using Svrnty.CQRS.Events.Abstractions.Storage; namespace Svrnty.CQRS.Events.Abstractions.Storage; /// /// Defines retention policy for an event stream. /// Controls how long events are kept before automatic cleanup. /// public interface IRetentionPolicy { /// /// Stream name this policy applies to. /// Use "*" for default policy that applies to all streams without specific policies. /// string StreamName { get; } /// /// Maximum age for events. Events older than this will be deleted. /// Null means no time-based retention. /// TimeSpan? MaxAge { get; } /// /// Maximum number of events to retain per stream. /// Only the most recent N events are kept, older events are deleted. /// Null means no size-based retention. /// long? MaxEventCount { get; } /// /// Whether this retention policy is currently enabled. /// Disabled policies are not enforced during cleanup. /// bool Enabled { get; } }