Code example for FileLock

Methods: isValid

0
	/** 
	 * The lock is valid if it was acquired and has not been released. 
	 * @return <code>true</code> if the lock is valid, <code>false</code> otherwise 
	 */ 
	public synchronized boolean isValid() { 
		return !locking || (lock != null && lock.isValid());
	} 
 
	/** 
	 * Release the file lock.  If this lock has already been released, this is a no-op. 
	 */ 
	public synchronized void release() { 
		if (!locking) {
			return; 
		} 
		if (lock != null) {
			try { 
				lock.release();
			} catch (IOException e) {
				//no-op 
Contextual code suggestions in your IDE  Get Codota for Java