ResultBackend class abstract
Result backend describes how task states are persisted and retrieved. Since: 0.1.0
- Implementers
Constructors
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
-
addGroupResult(
String groupId, TaskStatus status) → Future< GroupStatus?> -
Adds the
statusto the group with the givengroupIdand returns the updated GroupStatus. -
claimChord(
String groupId, {String? callbackTaskId, DateTime? dispatchedAt}) → Future< bool> -
Attempts to claim responsibility for dispatching the chord callback for
groupId. Returnstrueonly for the first caller; subsequent callers receivefalseonce the chord has been claimed. WhencallbackTaskIdordispatchedAtare provided, implementations SHOULD persist them with the group metadata so other components can observe dispatch progress. -
close(
) → Future< void> - Releases any resources held by the backend.
-
expire(
String taskId, Duration ttl) → Future< void> -
Updates the expiration for the given
taskId. -
get(
String taskId) → Future< TaskStatus?> -
Retrieves the TaskStatus for the task with the given
taskId, or null if not found. -
getGroup(
String groupId) → Future< GroupStatus?> -
Retrieves the GroupStatus for the group with the given
groupId, or null if not found. -
getWorkerHeartbeat(
String workerId) → Future< WorkerHeartbeat?> -
Retrieves the last persisted heartbeat snapshot for
workerId, or null if no heartbeat has been recorded within the retention window. -
initGroup(
GroupDescriptor descriptor) → Future< void> -
Initializes a group with the given
descriptor. -
listTaskStatuses(
TaskStatusListRequest request) → Future< TaskStatusPage> -
Lists task status records using the provided
requestfilters. -
listWorkerHeartbeats(
) → Future< List< WorkerHeartbeat> > - Lists all worker heartbeat snapshots.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
set(
String taskId, TaskState state, {Object? payload, TaskError? error, int attempt, Map< String, Object?> meta, Duration? ttl}) → Future<void> -
Sets the status for the task with the given
taskId. -
setWorkerHeartbeat(
WorkerHeartbeat heartbeat) → Future< void> -
Persist the latest
heartbeatsnapshot for a worker. -
toString(
) → String -
A string representation of this object.
inherited
-
watch(
String taskId) → Stream< TaskStatus> -
Returns a stream of TaskStatus updates for the task with the given
taskId.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited