Skip to content
Tracon

RetentionPolicyResolver

Namespace Tracon · Assembly Tracon.Core.dll

Combines the database policy with the configuration default for a target.

public sealed class RetentionPolicyResolver

objectRetentionPolicyResolver

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

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.

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)

policyStore IRetentionPolicyStore

optionsMonitor IOptionsMonitor<TraconRetentionOptions>

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.

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)

tenantId string

The tenant identity.

target string

The target name.

cancellationToken CancellationToken

The cancellation token.

ValueTask<ResolvedRetentionPolicy?>

The effective rule; null if nothing is to be deleted.