tryAcquireLock method

  1. @override
Future<bool> tryAcquireLock(
  1. String? correlationId,
  2. String key,
  3. int ttl
)
override

Makes a single attempt to acquire a lock by its key. It returns immediately a positive or negative result.

  • correlationId (optional) transaction id to trace execution through call chain.
  • key a unique lock key to acquire.
  • ttl a lock timeout (time to live) in milliseconds. Return Future that receives a lock result or error.

Implementation

@override
Future<bool> tryAcquireLock(
    String? correlationId, String key, int ttl) async {
  return true;
}