tryLock abstract method

Future<ServerMutexLease?> tryLock(
  1. String atSign,
  2. String enrollmentId, {
  3. required Duration ttl,
})

Takes the lock on the document of enrollmentId for ttl, or returns null while it is held. Every other failure is thrown.

Implementation

Future<ServerMutexLease?> tryLock(String atSign, String enrollmentId,
    {required Duration ttl});