AdjacentLockStrategy constructor

AdjacentLockStrategy(
  1. String targetPath, {
  2. bool readOnly = false,
  3. Duration? timeout,
})

Creates an AdjacentLockStrategy for the container at targetPath.

With readOnly, an existing lock file is opened without write access.

With timeout, a contended lock is retried with backoff and fails with WalPackLockException instead of waiting forever.

Implementation

AdjacentLockStrategy(
  String targetPath, {
  super.readOnly = false,
  super.timeout,
}) : super('${_canonicalizePath(targetPath)}.lock');