InMemoryCheckpointStore class

In-memory implementation of CheckpointStore for testing only.

Stores all data in plain Dart collections. Data is lost when the process exits — do not use in production. For persistent storage, use SqliteCheckpointStore from package:durable_workflow_sqlite.

Import via the dedicated test barrel:

import 'package:durable_workflow/testing.dart';
Implemented types

Constructors

InMemoryCheckpointStore()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deleteCompletedBefore(DateTime cutoff) Future<int>
Deletes all completed executions with updatedAt before cutoff.
override
deleteExecution(String workflowExecutionId) Future<void>
Deletes a workflow execution and all associated data (checkpoints, timers, signals).
override
deleteOldSignals(DateTime cutoff) Future<int>
Deletes signals in terminal states (DELIVERED, EXPIRED) older than cutoff.
override
deleteOldTimers(DateTime cutoff) Future<int>
Deletes timers in terminal states (FIRED, CANCELLED) older than cutoff.
override
loadCheckpoints(String workflowExecutionId) Future<List<StepCheckpoint>>
Loads all checkpoints for a given workflow execution, ordered by StepCheckpoint.stepIndex ascending.
override
loadExecution(String workflowExecutionId) Future<WorkflowExecution?>
Loads a workflow execution by its ID.
override
loadExecutionsByStatus(List<ExecutionStatus> statuses) Future<List<WorkflowExecution>>
Loads all workflow executions matching any of the given statuses.
override
loadPendingSignals(String workflowExecutionId, {String? signalName}) Future<List<WorkflowSignal>>
Loads all pending signals for a given workflow execution and optional signal name filter.
override
loadPendingTimers() Future<List<WorkflowTimer>>
Loads all pending timers that should have fired by now or will fire in the near future.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveCheckpoint(StepCheckpoint checkpoint) Future<void>
Persists a step checkpoint.
override
saveCheckpoints(List<StepCheckpoint> checkpoints) Future<void>
Persists multiple checkpoints in a single batch operation.
override
saveExecution(WorkflowExecution execution) Future<void>
Persists a workflow execution state.
override
saveSignal(WorkflowSignal signal) Future<void>
Persists a workflow signal.
override
saveTimer(WorkflowTimer timer) Future<void>
Persists a workflow timer.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited