Home
last modified time | relevance | path

Searched refs:FileLock (Results 1 – 18 of 18) 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.java28 import java.nio.channels.FileLock;
41 class MockFileLock extends FileLock {
84 FileLock fileLock1 = new MockFileLock(null, 0, 0, false); in test_Constructor_Ljava_nio_channels_FileChannelJJZ()
117 FileLock lock = new MockFileLock(null, 0, 10, true); in test_channel()
128 FileLock fileLock1 = new MockFileLock(readWriteChannel, 20, 100, true); in test_position()
132 FileLock fileLock2 = new MockFileLock(readWriteChannel, position, 100, in test_position()
141 FileLock fileLock1 = new MockFileLock(readWriteChannel, 20, 100, true); in test_size()
146 FileLock fileLock2 = new MockFileLock(readWriteChannel, position, size, in test_size()
157 FileLock lock = new MockFileLock(null, 0, 10, true); in test_isShared()
182 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.java471 CompletionHandler<FileLock,? super A> handler); in lock() argument
502 CompletionHandler<FileLock,? super A> handler) in lock() argument
542 public abstract Future<FileLock> lock(long position, long size, boolean shared); in lock()
566 public final Future<FileLock> lock() { in lock()
616 public abstract FileLock tryLock(long position, long size, boolean shared) in tryLock()
649 public final FileLock tryLock() throws IOException { in tryLock()
DFileLock.java123 public abstract class FileLock implements AutoCloseable { class
151 protected FileLock(FileChannel channel, in FileLock() method in FileLock
194 protected FileLock(AsynchronousFileChannel channel, in FileLock() method in FileLock
DFileChannel.java1021 public abstract FileLock lock(long position, long size, boolean shared) in lock()
1062 public final FileLock lock() throws IOException { in lock()
1132 public abstract FileLock tryLock(long position, long size, boolean shared) in tryLock()
1164 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/
DFileLockTest.java26 import java.nio.channels.FileLock;
41 FileLock lock = fc.lock(0, 42, false); in testToString()
60 FileLock lock = fc.lock(0, 42, true); in testToString()
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()
DAsynchronousFileChannelTest.java30 import java.nio.channels.FileLock;
706 static class LockHandler implements CompletionHandler<FileLock, Integer> {
707 public FileLock fileLock;
713 public void completed(FileLock fileLock, Integer attachment) { in completed()
/libcore/api/
Dcurrent.txt6512 …long, long, boolean, A, java.nio.channels.CompletionHandler<java.nio.channels.FileLock,? super A>);
6513 … final <A> void lock(A, java.nio.channels.CompletionHandler<java.nio.channels.FileLock,? super A>);
6514 …method public abstract java.util.concurrent.Future<java.nio.channels.FileLock> lock(long, long, bo…
6515 method public final java.util.concurrent.Future<java.nio.channels.FileLock> lock();
6522 …method public abstract java.nio.channels.FileLock tryLock(long, long, boolean) throws java.io.IOEx…
6523 method public final java.nio.channels.FileLock tryLock() throws java.io.IOException;
6628 …method public abstract java.nio.channels.FileLock lock(long, long, boolean) throws java.io.IOExcep…
6629 method public final java.nio.channels.FileLock lock() throws java.io.IOException;
6639 …method public abstract java.nio.channels.FileLock tryLock(long, long, boolean) throws java.io.IOEx…
6640 method public final java.nio.channels.FileLock tryLock() throws java.io.IOException;
[all …]
/libcore/
Dopenjdk_java_files.bp400 "ojluni/src/main/java/java/nio/channels/FileLock.java",
DEXPECTED_UPSTREAM417 …src/main/java/java/nio/channels/FileLock.java,jdk17u/jdk-17.0.6-ga,src/java.base/share/classes/jav…