Files
git.stella-ops.org/src/Scheduler/__Libraries/StellaOps.Scheduler.Queue/Models/SchedulerDequeueResult.cs
2026-01-06 19:07:48 +02:00

66 lines
1.9 KiB
C#

// -----------------------------------------------------------------------------
// SchedulerDequeueResult.cs
// Sprint: SPRINT_20260105_002_002_SCHEDULER_hlc_queue_chain
// Task: SQC-010 - Implement HlcSchedulerDequeueService
// -----------------------------------------------------------------------------
using StellaOps.HybridLogicalClock;
namespace StellaOps.Scheduler.Queue.Models;
/// <summary>
/// Represents a dequeued job with its HLC ordering and chain proof.
/// </summary>
public sealed record SchedulerDequeueResult
{
/// <summary>
/// Job identifier.
/// </summary>
public required Guid JobId { get; init; }
/// <summary>
/// HLC timestamp that determines this job's position in the total order.
/// </summary>
public required HlcTimestamp Timestamp { get; init; }
/// <summary>
/// HLC timestamp as sortable string.
/// </summary>
public required string THlcString { get; init; }
/// <summary>
/// Tenant this job belongs to.
/// </summary>
public required string TenantId { get; init; }
/// <summary>
/// Queue partition for this job.
/// </summary>
public string PartitionKey { get; init; } = string.Empty;
/// <summary>
/// Chain link proving sequence position.
/// </summary>
public required byte[] Link { get; init; }
/// <summary>
/// Previous chain link (null for first entry).
/// </summary>
public byte[]? PrevLink { get; init; }
/// <summary>
/// SHA-256 hash of the canonical payload.
/// </summary>
public required byte[] PayloadHash { get; init; }
/// <summary>
/// Database sequence number for reference (not authoritative).
/// </summary>
public long SeqBigint { get; init; }
/// <summary>
/// Wall-clock creation time (not authoritative for ordering).
/// </summary>
public DateTimeOffset CreatedAt { get; init; }
}