using System;
namespace ZB.MOM.WW.MxGateway.Worker.MxAccess;
public sealed class WorkerRuntimeHeartbeatSnapshot
{
/// Initializes a new instance of the class.
/// Timestamp of the last STA thread activity in UTC.
/// Number of commands awaiting processing.
/// Current depth of the worker event queue.
/// Sequence number of the most recent event.
/// Correlation ID of the in-flight command.
public WorkerRuntimeHeartbeatSnapshot(
DateTimeOffset lastStaActivityUtc,
uint pendingCommandCount,
uint outboundEventQueueDepth,
ulong lastEventSequence,
string currentCommandCorrelationId)
{
LastStaActivityUtc = lastStaActivityUtc;
PendingCommandCount = pendingCommandCount;
OutboundEventQueueDepth = outboundEventQueueDepth;
LastEventSequence = lastEventSequence;
CurrentCommandCorrelationId = currentCommandCorrelationId ?? string.Empty;
}
/// Gets the last STA activity timestamp in UTC.
public DateTimeOffset LastStaActivityUtc { get; }
/// Gets the pending command count.
public uint PendingCommandCount { get; }
/// Gets the current depth of the worker event queue.
public uint OutboundEventQueueDepth { get; }
/// Gets the sequence number of the most recent event.
public ulong LastEventSequence { get; }
/// Gets the correlation ID of the in-flight command.
public string CurrentCommandCorrelationId { get; }
}