/** * Create the lock file if it doesn't already exist and lock it with * an exclusive lock. * * @param lockFileName the name of the lock file * @return the FileLock object representing the lock file * @throws IOException if the file has already been locked or an I/O error * occurs. */ public static LockFile createLockFile( String lockFileName ) throws IOException { return createLockFile(new File(lockFileName)); }
this.fileName = fileName; lockFile = LockFile.createLockFile(fileName + ".np.lock");
this.fileName = fileName; lockFile = LockFile.createLockFile(fileName + ".sp.lock");