Class MaterializedViewRefreshOptions
- Namespace
- Excalibur.EventSourcing.Services
- Assembly
- Excalibur.EventSourcing.dll
Configuration options for the Excalibur.EventSourcing.Services.MaterializedViewRefreshService.
public sealed class MaterializedViewRefreshOptions
- Inheritance
-
MaterializedViewRefreshOptions
- Inherited Members
Properties
BatchSize
Gets or sets the batch size for event processing during refresh.
[Range(1, 10000)]
public int BatchSize { get; set; }
Property Value
- int
The number of events to process per batch. Default is 100.
CatchUpOnStartup
Gets or sets a value indicating whether to catch up all views on application startup.
public bool CatchUpOnStartup { get; set; }
Property Value
CronExpression
Gets or sets the cron expression for schedule-based refreshes.
public string? CronExpression { get; set; }
Property Value
- string
A cron expression (5-part format: minute, hour, day-of-month, month, day-of-week). Default is null.
Remarks
When set, cron-based scheduling takes precedence over RefreshInterval. Uses NCrontab format: "* * * * *" (minute hour day-of-month month day-of-week).
Examples:
"*/5 * * * *"- Every 5 minutes"0 * * * *"- Every hour at minute 0"0 0 * * *"- Daily at midnight"0 2 * * 0"- Weekly on Sunday at 2 AM
Enabled
Gets or sets a value indicating whether the service is enabled.
public bool Enabled { get; set; }
Property Value
InitialRetryDelay
Gets or sets the initial delay for exponential backoff retry on transient failures.
public TimeSpan InitialRetryDelay { get; set; }
Property Value
- TimeSpan
The initial retry delay. Default is 1 second.
MaxRetryCount
Gets or sets the maximum number of retry attempts before giving up.
[Range(0, 2147483647)]
public int MaxRetryCount { get; set; }
Property Value
- int
The maximum retry count. Default is 5. Set to 0 for infinite retries.
MaxRetryDelay
Gets or sets the maximum delay for exponential backoff retry.
public TimeSpan MaxRetryDelay { get; set; }
Property Value
- TimeSpan
The maximum retry delay. Default is 5 minutes.
RefreshInterval
Gets or sets the refresh interval for polling-based scheduling.
public TimeSpan? RefreshInterval { get; set; }
Property Value
- TimeSpan?
The interval between refresh cycles. Default is 30 seconds. Set to null to disable interval-based scheduling.
Remarks
If both RefreshInterval and CronExpression are set, the cron expression takes precedence.