Lines Matching refs:FileLock
29 import java.nio.channels.FileLock;
47 private static final Comparator<FileLock> LOCK_COMPARATOR = new Comparator<FileLock>() {
48 public int compare(FileLock lock1, FileLock lock2) {
60 private final SortedSet<FileLock> locks = new TreeSet<FileLock>(LOCK_COMPARATOR);
94 private FileLock basicLock(long position, long size, boolean shared, boolean wait) throws IOException {
110 FileLock pendingLock = new FileLockImpl(this, position, size, shared);
137 private static final class FileLockImpl extends FileLock {
159 public final FileLock lock(long position, long size, boolean shared) throws IOException {
161 FileLock resultLock = null;
179 public final FileLock tryLock(long position, long size, boolean shared) throws IOException {
188 public void release(FileLock lock) throws IOException {
544 private synchronized void addLock(FileLock lock) throws OverlappingFileLockException {
546 for (FileLock existingLock : locks) {
563 private synchronized void removeLock(FileLock lock) {