.NET API
RetentionPolicyResolver
Tracon.Core.dllCombines the database policy with the configuration default for a target.
public sealed class RetentionPolicyResolverInheritance
Section titled “Inheritance”object ← RetentionPolicyResolver
Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”Order: first the explicit record in IRetentionPolicyStore
(tenant, then "*") is looked up; if found, configuration is not
consulted at all. If there is no record, TraconRetentionOptions
takes over, but only while TraconRetentionOptions.Enabled is on.
Constructors
Section titled “Constructors”RetentionPolicyResolver(IRetentionPolicyStore, IOptionsMonitor<TraconRetentionOptions>)
Section titled “ RetentionPolicyResolver(IRetentionPolicyStore, IOptionsMonitor<TraconRetentionOptions>)”Combines the database policy with the configuration default for a target.
public RetentionPolicyResolver(IRetentionPolicyStore policyStore, IOptionsMonitor<TraconRetentionOptions> optionsMonitor)Parameters
Section titled “Parameters”policyStore IRetentionPolicyStore
optionsMonitor IOptionsMonitor<TraconRetentionOptions>
Remarks
Section titled “Remarks”Order: first the explicit record in IRetentionPolicyStore
(tenant, then "*") is looked up; if found, configuration is not
consulted at all. If there is no record, TraconRetentionOptions
takes over, but only while TraconRetentionOptions.Enabled is on.
Methods
Section titled “Methods”ResolveAsync(string, string, CancellationToken)
Section titled “ ResolveAsync(string, string, CancellationToken)”Resolves the effective retention rule for a target.
public ValueTask<ResolvedRetentionPolicy?> ResolveAsync(string tenantId, string target, CancellationToken cancellationToken = default)Parameters
Section titled “Parameters”tenantId string
The tenant identity.
target string
The target name.
cancellationToken CancellationToken
The cancellation token.
Returns
Section titled “Returns”ValueTask<ResolvedRetentionPolicy?>
The effective rule; null if nothing is to be deleted.