UniqueTaskCoordinator class
Coordinates unique task claims using a LockStore.
Constructors
- UniqueTaskCoordinator({required LockStore lockStore, Duration defaultTtl = const Duration(minutes: 5), String namespace = 'stem:unique'})
-
Creates a coordinator that uses the provided
lockStore.
Properties
- defaultTtl → Duration
-
Default TTL used when no unique duration is provided.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- lockStore → LockStore
-
Lock store backing unique claims.
final
- namespace → String
-
Namespace prefix for unique lock keys.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
acquire(
{required Envelope envelope, required TaskOptions options}) → Future< UniqueTaskClaim> -
Attempts to claim uniqueness for
envelopeusingoptions. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
release(
String uniqueKey, String owner) → Future< bool> -
Releases the uniqueness lock associated with
uniqueKeyandowner. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited