/** Method that goes upon list of folders and updates its locks. This is used when * an object is masked which may lead to creation of folders on a disk. * * @param fo folder to check * @exception IOException if something locks cannot be updated */ private static void updateFoldersLock(FileObject fo) throws IOException { while (fo != null) { MultiFileObject mfo = (MultiFileObject) fo; MfLock l = (mfo.lock == null) ? null : mfo.lock.get(); if (l != null) { // the file has been locked => update the lock mfo.writable(true); } fo = fo.getParent(); } }
public OutputStream getOutputStream(FileLock lock) throws java.io.IOException { MfLock l; FileLock lWritable; FileObject fo; try { getFileSystem().beginAtomicAction(markAtomicAction); synchronized (this) { l = testLock(lock); // this can also change lock in l.lock fo = writable(false); lWritable = l.findLock(fo); } return fo.getOutputStream(lWritable); } finally { getFileSystem().finishAtomicAction(); } }
leader = writable(true); l = lck.findLock(leader);
/** Method that goes upon list of folders and updates its locks. This is used when * an object is masked which may lead to creation of folders on a disk. * * @param fo folder to check * @exception IOException if something locks cannot be updated */ private static void updateFoldersLock (FileObject fo) throws IOException { while (fo != null) { MultiFileObject mfo = (MultiFileObject)fo; MfLock l = (MfLock)(mfo.lock == null ? null : mfo.lock.get ()); if (l != null) { // the file has been locked => update the lock mfo.writable (); } fo = fo.getParent (); } }
/** Method that goes upon list of folders and updates its locks. This is used when * an object is masked which may lead to creation of folders on a disk. * * @param fo folder to check * @exception IOException if something locks cannot be updated */ private static void updateFoldersLock (FileObject fo) throws IOException { while (fo != null) { MultiFileObject mfo = (MultiFileObject)fo; MfLock l = (MfLock)(mfo.lock == null ? null : mfo.lock.get ()); if (l != null) { // the file has been locked => update the lock mfo.writable (); } fo = fo.getParent (); } }
public OutputStream getOutputStream (FileLock lock) throws java.io.IOException { MfLock l; FileLock lWritable; FileObject fo; try { getFileSystem ().beginAtomicAction (markAtomicAction); synchronized (this) { l = testLock (lock); // this can also change lock in l.lock fo = writable (); lWritable = l.findLock (fo); } return fo.getOutputStream (lWritable); } finally { getFileSystem ().finishAtomicAction (); } }
public OutputStream getOutputStream (FileLock lock) throws java.io.IOException { MfLock l; FileLock lWritable; FileObject fo; try { getFileSystem ().beginAtomicAction (markAtomicAction); synchronized (this) { l = testLock (lock); // this can also change lock in l.lock fo = writable (); lWritable = l.findLock (fo); } return fo.getOutputStream (lWritable); } finally { getFileSystem ().finishAtomicAction (); } }
leader = writable (); l = lck.findLock (leader);
leader = writable (); l = lck.findLock (leader);