code: void lock(Path lockFile) throws JobLockException {
      log.debug("Creating lock: {}", lockFile);
      try {
        if (!this.fs.createNewFile(lockFile)) {
          throw new JobLockException("Failed to create lock file " + lockFile.getName());
        }
      } catch (IOException e) {
        throw new JobLockException(e);
      }
    }
docs: Acquire the lock.
  
  @throws JobLockException thrown if the {@link JobLock} fails to be acquired