Files
CBDDC/src/ZB.MOM.WW.CBDDC.Network/IOplogPruneCutoffCalculator.cs

22 lines
811 B
C#

using System.Threading;
using System.Threading.Tasks;
using ZB.MOM.WW.CBDDC.Core.Network;
namespace ZB.MOM.WW.CBDDC.Network;
/// <summary>
/// Calculates the effective oplog prune cutoff for maintenance.
/// </summary>
public interface IOplogPruneCutoffCalculator
{
/// <summary>
/// Calculates the effective prune cutoff for the provided node configuration.
/// </summary>
/// <param name="configuration">The local node configuration.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>A prune cutoff decision describing whether prune is allowed and at which cutoff.</returns>
Task<OplogPruneCutoffDecision> CalculateEffectiveCutoffAsync(
PeerNodeConfiguration configuration,
CancellationToken cancellationToken = default);
}