Table of Contents

Class CdcHealthState

Namespace
Excalibur.Cdc.SqlServer
Assembly
Excalibur.Cdc.SqlServer.dll

Thread-safe state tracker for CDC processor health monitoring.

public sealed class CdcHealthState
Inheritance
CdcHealthState
Inherited Members

Remarks

The CDC processor updates this state during processing. Health checks read from it to determine processor health status.

Register as a singleton in DI:

services.AddSingleton<CdcHealthState>();

Properties

IsRunning

Gets a value indicating whether the processor is currently running.

public bool IsRunning { get; }

Property Value

bool

true if the processor is running; otherwise, false.

LastActivityTime

Gets the time of the last processing activity.

public DateTimeOffset? LastActivityTime { get; }

Property Value

DateTimeOffset?

The last activity time, or null if no activity has occurred.

TotalCycles

Gets the total number of processing cycles completed.

public long TotalCycles { get; }

Property Value

long

The total cycle count.

TotalFailed

Gets the total number of failed events since the processor started.

public long TotalFailed { get; }

Property Value

long

The total failed count.

TotalProcessed

Gets the total number of events processed since the processor started.

public long TotalProcessed { get; }

Property Value

long

The total processed count.

Methods

MarkStarted()

Marks the processor as started.

public void MarkStarted()

MarkStopped()

Marks the processor as stopped.

public void MarkStopped()

RecordCycle(int, int)

Records processed events.

public void RecordCycle(int processedCount, int failedCount)

Parameters

processedCount int

The number of events processed.

failedCount int

The number of events that failed.