Abstract contract for distributed locking across multi-instance production clusters.
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
-
acquire(
String resource, {Duration ttl = const Duration(seconds: 10)}) → Future< String?> -
Attempts to acquire a distributed lock for
resourcewith a leasettl. Returns a fencing token or ownership string if successful, ornullif locked. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
release(
String resource, String lockToken) → Future< bool> -
Releases the lock if
lockTokenmatches current ownership. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited