SignalManager class
Manages durable signals for workflow waitSignal operations.
When a workflow calls ctx.waitSignal(name, timeout), a PENDING signal
record is persisted to the CheckpointStore and a Completer is returned.
When sendSignal() is called, the matching PENDING signal is found,
marked as DELIVERED, and its completer is completed with the payload.
If a signal has already been sent before waitSignal is called, the
existing PENDING signal is consumed immediately.
Constructors
- SignalManager({required CheckpointStore store})
- Creates a SignalManager.
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
-
cancelSignals(
String workflowExecutionId) → Future< void> - Cancels all pending signals for a given execution.
-
deliverSignal(
{required String workflowExecutionId, required String signalName, Object? payload}) → Future< void> - Delivers a signal to a waiting workflow.
-
dispose(
) → void - Disposes all resources.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
restorePendingSignals(
String workflowExecutionId) → Future< void> - Restores pending signals from the store after a process restart.
-
toString(
) → String -
A string representation of this object.
inherited
-
waitForSignal(
{required String workflowExecutionId, required String signalName, Duration? timeout}) → Future< Object?> - Waits for a signal to be delivered to a workflow execution.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited