sprints and audit work
This commit is contained in:
@@ -52,31 +52,3 @@ public interface IHybridLogicalClock
|
||||
string NodeId { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Persistent storage for HLC state (survives restarts).
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Implementations should ensure atomic updates to prevent state loss
|
||||
/// during concurrent access or node failures.
|
||||
/// </remarks>
|
||||
public interface IHlcStateStore
|
||||
{
|
||||
/// <summary>
|
||||
/// Load last persisted HLC state for node.
|
||||
/// </summary>
|
||||
/// <param name="nodeId">Node identifier to load state for</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
/// <returns>Last persisted timestamp, or null if no state exists</returns>
|
||||
Task<HlcTimestamp?> LoadAsync(string nodeId, CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
/// Persist HLC state.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Called after each tick to ensure state survives restarts.
|
||||
/// Implementations may batch or debounce writes for performance.
|
||||
/// </remarks>
|
||||
/// <param name="timestamp">Current timestamp to persist</param>
|
||||
/// <param name="ct">Cancellation token</param>
|
||||
Task SaveAsync(HlcTimestamp timestamp, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user