public AsyncFileLock(Path p) throws IOException {
  Objects.requireNonNull(p);
  fileToLock=FileChannel.open(p,StandardOpenOption.CREATE,StandardOpenOption.WRITE);
  closeChannel=true;
}

public AsyncFileLock ( Path p ) throws IOException { Objects . requireNonNull ( p ) ; fileToLock = FileChannel . open ( p , StandardOpenOption . CREATE , StandardOpenOption . WRITE ) ; closeChannel = true ; }
creates a new asyncfilelock from a path to a file . the file will be created if it does not exist . the file will be used for locking purposes only .
