unlock method

Future<void> unlock(
  1. String key,
  2. Cas cas, [
  3. UnlockOptions? options
])

Unlocks a previously locked document.

cas is the Cas value returned by the getAndLock operation that proves the lock ownership.

Implementation

Future<void> unlock(
  String key,
  Cas cas, [
  UnlockOptions? options,
]) async {
  options ??= const UnlockOptions();

  await _connection.unlock(
    UnlockRequest(
      id: _documentId(key),
      cas: cas,
      timeout: _kvTimeout(options),
      partition: 0,
      opaque: 0,
    ),
  );
}