Home
last modified time | relevance | path

Searched refs:FileLock (Results 1 – 15 of 15) sorted by relevance

/libcore/ojluni/src/main/java/sun/nio/ch/
DFileLockTable.java56 public abstract void add(FileLock fl) throws OverlappingFileLockException; in add()
61 public abstract void remove(FileLock fl); in remove()
68 public abstract List<FileLock> removeAll(); in removeAll()
73 public abstract void replace(FileLock fl1, FileLock fl2); in replace()
88 private static class FileLockReference extends WeakReference<FileLock> {
91 FileLockReference(FileLock referent, in FileLockReference()
92 ReferenceQueue<FileLock> queue, in FileLockReference()
110 private static ReferenceQueue<FileLock> queue = new ReferenceQueue<FileLock>();
124 public void add(FileLock fl) throws OverlappingFileLockException { in add()
174 public void remove(FileLock fl) { in remove()
[all …]
DAsynchronousFileChannelImpl.java106 abstract <A> Future<FileLock> implLock(long position, in implLock()
110 CompletionHandler<FileLock,? super A> handler); in implLock() argument
113 public final Future<FileLock> lock(long position, in lock()
126 CompletionHandler<FileLock,? super A> handler) in lock() argument
147 for (FileLock fl: fileLockTable.removeAll()) { in invalidateAllLocks()
DFileChannelImpl.java39 import java.nio.channels.FileLock;
144 for (FileLock fl: fileLockTable.removeAll()) { in implCloseChannel()
1119 public FileLock lock(long position, long size, boolean shared) in lock()
1164 public FileLock tryLock(long position, long size, boolean shared) in tryLock()
1223 private final List<FileLock> lockList = new ArrayList<FileLock>(2);
1232 for (FileLock fl: lockList) { in checkList()
1239 public void add(FileLock fl) throws OverlappingFileLockException { in add()
1246 public void remove(FileLock fl) { in remove()
1252 public List<FileLock> removeAll() { in removeAll()
1254 List<FileLock> result = new ArrayList<FileLock>(lockList); in removeAll()
[all …]
DSimpleAsynchronousFileChannelImpl.java173 <A> Future<FileLock> implLock(final long position, in implLock()
177 final CompletionHandler<FileLock,? super A> handler) in implLock() argument
194 final PendingFuture<FileLock,A> result = (handler == null) ? in implLock()
195 new PendingFuture<FileLock,A>(this) : null; in implLock()
243 public FileLock tryLock(long position, long size, boolean shared) in tryLock()
DFileLockImpl.java32 extends FileLock
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DFileLockTest.java25 import java.nio.channels.FileLock;
38 class MockFileLock extends FileLock {
76 FileLock fileLock1 = new MockFileLock(null, 0, 0, false); in test_Constructor_Ljava_nio_channels_FileChannelJJZ()
105 FileLock lock = new MockFileLock(null, 0, 10, true); in test_channel()
113 FileLock fileLock1 = new MockFileLock(readWriteChannel, 20, 100, true); in test_position()
117 FileLock fileLock2 = new MockFileLock(readWriteChannel, position, 100, in test_position()
126 FileLock fileLock1 = new MockFileLock(readWriteChannel, 20, 100, true); in test_size()
131 FileLock fileLock2 = new MockFileLock(readWriteChannel, position, size, in test_size()
141 FileLock lock = new MockFileLock(null, 0, 10, true); in test_isShared()
163 FileLock fileLock = readWriteChannel.lock(); in test_isValid()
[all …]
DFileChannelLockingTest.java26 import java.nio.channels.FileLock;
106 FileLock flock = readWriteChannel.lock(); in test_lockReadWrite()
134 FileLock flock1 = readWriteChannel.lock(22, 110, true); in test_illegalLockParameters()
147 FileLock flock1 = readWriteChannel.lock(0, 10, false); in test_lockLLZ()
150 FileLock flock2 = readWriteChannel.lock(22, 100, true); in test_lockLLZ()
184 FileLock tmpLock = readOnlyChannel.tryLock(0, 10, true); in test_tryLockLLZ()
189 FileLock lock = readOnlyChannel.tryLock(10, 788, true); in test_tryLockLLZ()
201 FileLock adjacentLock = readOnlyChannel.tryLock(1, 3, true); in test_tryLockLLZ()
DFileChannelTest.java35 import java.nio.channels.FileLock;
114 private FileLock fileLock;
862 FileLock fileLock1 = writeOnlyFileChannel.lock(POSITION, SIZE, false); in test_lockJJZ_NotOverlapping()
864 FileLock fileLock2 = writeOnlyFileChannel.lock(POSITION + SIZE, SIZE, in test_lockJJZ_NotOverlapping()
1149 FileLock fileLock1 = writeOnlyFileChannel in test_tryLockJJZ_NotOverlapping()
1153 FileLock fileLock2 = writeOnlyFileChannel.tryLock(POSITION + SIZE, in test_tryLockJJZ_NotOverlapping()
3128 public FileLock lock(long position, long size, boolean shared) in lock()
3187 public FileLock tryLock(long position, long size, boolean shared) in tryLock()
/libcore/ojluni/src/main/java/java/nio/channels/
DAsynchronousFileChannel.java461 CompletionHandler<FileLock,? super A> handler); in lock() argument
492 CompletionHandler<FileLock,? super A> handler) in lock() argument
532 public abstract Future<FileLock> lock(long position, long size, boolean shared); in lock()
556 public final Future<FileLock> lock() { in lock()
606 public abstract FileLock tryLock(long position, long size, boolean shared) in tryLock()
639 public final FileLock tryLock() throws IOException { in tryLock()
DFileLock.java119 public abstract class FileLock implements AutoCloseable { class
147 protected FileLock(FileChannel channel, in FileLock() method in FileLock
185 protected FileLock(AsynchronousFileChannel channel, in FileLock() method in FileLock
DFileChannel.java1011 public abstract FileLock lock(long position, long size, boolean shared) in lock()
1052 public final FileLock lock() throws IOException { in lock()
1122 public abstract FileLock tryLock(long position, long size, boolean shared) in tryLock()
1154 public final FileLock tryLock() throws IOException { in tryLock()
/libcore/ojluni/annotations/hiddenapi/sun/nio/ch/
DFileChannelImpl.java194 public java.nio.channels.FileLock lock(long position, long size, boolean shared) in lock()
199 public java.nio.channels.FileLock tryLock(long position, long size, boolean shared) in tryLock()
320 public void add(java.nio.channels.FileLock fl) in add()
325 public void remove(java.nio.channels.FileLock fl) { in remove()
329 public java.util.List<java.nio.channels.FileLock> removeAll() { in removeAll()
333 public void replace(java.nio.channels.FileLock fl1, java.nio.channels.FileLock fl2) { in replace()
337 private final java.util.List<java.nio.channels.FileLock> lockList;
/libcore/luni/src/test/java/libcore/java/nio/channels/
DOldFileChannelTest.java31 import java.nio.channels.FileLock;
76 private FileLock fileLock;
239 FileLock lock = readWriteFileChannel.tryLock(tooBig, 1, false); in testTryLockVeryLarge()
249 FileLock lockOne = readWriteFileChannel.tryLock(0, 10, false); in testTryLockOverlapping()
250 FileLock lockTwo = readWriteFileChannel.tryLock(10, 20, false); in testTryLockOverlapping()
/libcore/api/
Dcurrent.txt5995 …long, long, boolean, A, java.nio.channels.CompletionHandler<java.nio.channels.FileLock,? super A>);
5996 … final <A> void lock(A, java.nio.channels.CompletionHandler<java.nio.channels.FileLock,? super A>);
5997 …method public abstract java.util.concurrent.Future<java.nio.channels.FileLock> lock(long, long, bo…
5998 method public final java.util.concurrent.Future<java.nio.channels.FileLock> lock();
6005 …method public abstract java.nio.channels.FileLock tryLock(long, long, boolean) throws java.io.IOEx…
6006 method public final java.nio.channels.FileLock tryLock() throws java.io.IOException;
6109 …method public abstract java.nio.channels.FileLock lock(long, long, boolean) throws java.io.IOExcep…
6110 method public final java.nio.channels.FileLock lock() throws java.io.IOException;
6120 …method public abstract java.nio.channels.FileLock tryLock(long, long, boolean) throws java.io.IOEx…
6121 method public final java.nio.channels.FileLock tryLock() throws java.io.IOException;
[all …]
/libcore/
Dopenjdk_java_files.bp381 "ojluni/src/main/java/java/nio/channels/FileLock.java",