public synchronized FileLock lock() throws IOException { if (lock != null) { FileLock f = lock.get(); if (f != null) { // System.out.println ("Already locked: " + this); // NOI18N throw new FileAlreadyLockedException(); } } getAbstractFileSystem().info.lock(getPath()); FileLock l = new AfLock(); lock = new WeakReference<FileLock>(l); // Thread.dumpStack (); // System.out.println ("Locking file: " + this); // NOI18N return l; }
public synchronized FileLock lock () throws IOException { if (lock != null) { FileLock f = (FileLock)lock.get (); if (f != null) { // System.out.println ("Already locked: " + this); // NOI18N throw new FileAlreadyLockedException(); } } getAbstractFileSystem ().info.lock (getPath ()); FileLock l = new AfLock (); lock = new WeakReference (l); // Thread.dumpStack (); // System.out.println ("Locking file: " + this); // NOI18N return l; }
public synchronized FileLock lock () throws IOException { if (lock != null) { FileLock f = (FileLock)lock.get (); if (f != null) { // System.out.println ("Already locked: " + this); // NOI18N throw new FileAlreadyLockedException(); } } getAbstractFileSystem ().info.lock (getPath ()); FileLock l = new AfLock (); lock = new WeakReference (l); // Thread.dumpStack (); // System.out.println ("Locking file: " + this); // NOI18N return l; }
public void releaseLock () { if (this.isValid()) { super.releaseLock(); unlock (this); } } }
public void releaseLock () { if (this.isValid()) { super.releaseLock(); unlock (this); } } }
public void releaseLock() { if (this.isValid()) { super.releaseLock(); unlock(this); } } }