public synchronized boolean isLocked() throws IOException { if (!isSet()) return false; return isLocked(lockFile); }
public synchronized boolean isLocked() throws IOException { if (!isSet()) return false; return isLocked(lockFile); }
public synchronized boolean isLocked() throws IOException { if (!isSet()) return false; return isLocked(lockFile); }
public synchronized boolean isLocked() throws IOException { if (!isSet()) return false; return isLocked(lockFile); }
public synchronized boolean isLocked() throws IOException { if (!isSet()) return false; return isLocked(lockFile); }
public synchronized boolean isLocked() throws IOException { if (!isSet()) return false; return isLocked(lockFile); }
private boolean lock(File lock, URL locationValue) throws IOException { if (isReadOnly) throw new IOException(NLS.bind(Msg.location_folderReadOnly, lock)); if (lock == null) { if (locationValue != null && !"file".equalsIgnoreCase(locationValue.getProtocol())) //$NON-NLS-1$ throw new IOException(NLS.bind(Msg.location_notFileProtocol, locationValue)); throw new IllegalStateException(Msg.location_noLockFile); // this is really unexpected } if (isLocked()) return false; File parentFile = new File(lock.getParent()); if (!parentFile.isDirectory()) { parentFile.mkdirs(); if (!parentFile.isDirectory()) throw new IOException(NLS.bind(Msg.location_folderReadOnly, parentFile)); } setLocker(lock); if (locker == null) return true; boolean locked = false; try { locked = locker.lock(); return locked; } finally { if (!locked) locker = null; } }
private boolean lock(File lock, URL locationValue) throws IOException { if (isReadOnly) throw new IOException(NLS.bind(Msg.location_folderReadOnly, lock)); if (lock == null) { if (locationValue != null && !"file".equalsIgnoreCase(locationValue.getProtocol())) //$NON-NLS-1$ throw new IOException(NLS.bind(Msg.location_notFileProtocol, locationValue)); throw new IllegalStateException(Msg.location_noLockFile); // this is really unexpected } if (isLocked()) return false; File parentFile = new File(lock.getParent()); if (!parentFile.isDirectory()) { parentFile.mkdirs(); if (!parentFile.isDirectory()) throw new IOException(NLS.bind(Msg.location_folderReadOnly, parentFile)); } setLocker(lock); if (locker == null) return true; boolean locked = false; try { locked = locker.lock(); return locked; } finally { if (!locked) locker = null; } }
private boolean lock(File lock, URL locationValue) throws IOException { if (isReadOnly) throw new IOException(NLS.bind(Msg.location_folderReadOnly, lock)); if (lock == null) { if (locationValue != null && !"file".equalsIgnoreCase(locationValue.getProtocol())) //$NON-NLS-1$ throw new IOException(NLS.bind(Msg.location_notFileProtocol, locationValue)); throw new IllegalStateException(Msg.location_noLockFile); // this is really unexpected } if (isLocked()) return false; File parentFile = new File(lock.getParent()); if (!parentFile.isDirectory()) { parentFile.mkdirs(); if (!parentFile.isDirectory()) throw new IOException(NLS.bind(Msg.location_folderReadOnly, parentFile)); } setLocker(lock); if (locker == null) return true; boolean locked = false; try { locked = locker.lock(); return locked; } finally { if (!locked) locker = null; } }
private boolean lock(File lock, URL locationValue) throws IOException { if (isReadOnly) throw new IOException(NLS.bind(Msg.location_folderReadOnly, lock)); if (lock == null) { if (locationValue != null && !"file".equalsIgnoreCase(locationValue.getProtocol())) //$NON-NLS-1$ throw new IOException(NLS.bind(Msg.location_notFileProtocol, locationValue)); throw new IllegalStateException(Msg.location_noLockFile); // this is really unexpected } if (isLocked()) return false; File parentFile = new File(lock.getParent()); if (!parentFile.isDirectory()) { parentFile.mkdirs(); if (!parentFile.isDirectory()) throw new IOException(NLS.bind(Msg.location_folderReadOnly, parentFile)); } setLocker(lock); if (locker == null) return true; boolean locked = false; try { locked = locker.lock(); return locked; } finally { if (!locked) locker = null; } }
private boolean lock(File lock, URL locationValue) throws IOException { if (isReadOnly) throw new IOException(NLS.bind(Msg.location_folderReadOnly, lock)); if (lock == null) { if (locationValue != null && !"file".equalsIgnoreCase(locationValue.getProtocol())) //$NON-NLS-1$ throw new IOException(NLS.bind(Msg.location_notFileProtocol, locationValue)); throw new IllegalStateException(Msg.location_noLockFile); // this is really unexpected } if (isLocked()) return false; File parentFile = new File(lock.getParent()); if (!parentFile.isDirectory()) { parentFile.mkdirs(); if (!parentFile.isDirectory()) throw new IOException(NLS.bind(Msg.location_folderReadOnly, parentFile)); } setLocker(lock); if (locker == null) return true; boolean locked = false; try { locked = locker.lock(); return locked; } finally { if (!locked) locker = null; } }
private boolean lock(File lock, URL locationValue) throws IOException { if (isReadOnly) throw new IOException(NLS.bind(Msg.location_folderReadOnly, lock)); if (lock == null) { if (locationValue != null && !"file".equalsIgnoreCase(locationValue.getProtocol())) //$NON-NLS-1$ throw new IOException(NLS.bind(Msg.location_notFileProtocol, locationValue)); throw new IllegalStateException(Msg.location_noLockFile); // this is really unexpected } if (isLocked()) return false; File parentFile = new File(lock.getParent()); if (!parentFile.isDirectory()) { parentFile.mkdirs(); if (!parentFile.isDirectory()) throw new IOException(NLS.bind(Msg.location_folderReadOnly, parentFile)); } setLocker(lock); if (locker == null) return true; boolean locked = false; try { locked = locker.lock(); return locked; } finally { if (!locked) locker = null; } }