RetentionPolicyResolver
AgentPrism.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, AgentPrismRetentionOptions
takes over, but only while AgentPrismRetentionOptions.Enabled is on.
Constructors
Section titled “Constructors”RetentionPolicyResolver(IRetentionPolicyStore, IOptionsMonitor<AgentPrismRetentionOptions>)
Section titled “ RetentionPolicyResolver(IRetentionPolicyStore, IOptionsMonitor<AgentPrismRetentionOptions>)”Combines the database policy with the configuration default for a target.
public RetentionPolicyResolver(IRetentionPolicyStore policyStore, IOptionsMonitor<AgentPrismRetentionOptions> optionsMonitor)Parameters
Section titled “Parameters”policyStore IRetentionPolicyStore
optionsMonitor IOptionsMonitor<AgentPrismRetentionOptions>
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, AgentPrismRetentionOptions
takes over, but only while AgentPrismRetentionOptions.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.