Class InMemoryFlowScheduleStateStore
- Namespace
- FlowOrchestrator.Core.Storage
- Assembly
- FlowOrchestrator.Core.dll
Process-local IFlowScheduleStateStore: dashboard pause states and cron overrides live for the lifetime of the process and are lost on restart.
public sealed class InMemoryFlowScheduleStateStore : IFlowScheduleStateStore
- Inheritance
-
InMemoryFlowScheduleStateStore
- Implements
- Inherited Members
Remarks
The single default used whenever no persistent store is registered — by AddFlowOrchestrator
(in-memory storage, or SQL / PostgreSQL storage with a custom runtime) and by
AddFlowDashboard when it is wired without AddFlowOrchestrator. The SQL Server and
PostgreSQL backends register their own durable implementations.
SaveAsync(FlowScheduleState) stores a copy, so a caller mutating the instance it saved — or one it read back — cannot change the stored state behind the store's back.
Constructors
InMemoryFlowScheduleStateStore()
Creates an empty store stamped with the system clock.
public InMemoryFlowScheduleStateStore()
InMemoryFlowScheduleStateStore(TimeProvider)
Creates an empty store that stamps UpdatedAtUtc from timeProvider.
public InMemoryFlowScheduleStateStore(TimeProvider timeProvider)
Parameters
timeProviderTimeProviderClock used for UpdatedAtUtc.
Methods
DeleteAsync(string)
Removes the schedule state for the given job ID if it exists.
public Task DeleteAsync(string jobId)
Parameters
jobIdstring
Returns
GetAllAsync()
Returns all persisted schedule states.
public Task<IReadOnlyList<FlowScheduleState>> GetAllAsync()
Returns
GetAsync(string)
Returns the schedule state for the given Hangfire recurring job ID, or null if no override has been saved.
public Task<FlowScheduleState?> GetAsync(string jobId)
Parameters
jobIdstring
Returns
SaveAsync(FlowScheduleState)
Inserts or replaces the schedule state for JobId.
public Task SaveAsync(FlowScheduleState state)
Parameters
stateFlowScheduleState