Searched refs:tryLock (Results 1 - 10 of 10) sorted by relevance

/libcore/luni/src/main/java/java/util/concurrent/locks/
H A DLock.java68 * #tryLock()}), an attempt to acquire the lock that can be
70 * the lock that can timeout ({@link #tryLock(long, TimeUnit)}).
215 * if (lock.tryLock()) {
231 boolean tryLock(); method in interface:Lock
291 boolean tryLock(long time, TimeUnit unit) throws InterruptedException; method in interface:Lock
H A DReentrantLock.java38 * Also note that the untimed {@link #tryLock() tryLock} method does not
98 * Performs non-fair tryLock. tryAcquire is
319 * fair ordering policy, a call to {@code tryLock()} <em>will</em>
325 * {@link #tryLock(long, TimeUnit) tryLock(0, TimeUnit.SECONDS) }
338 public boolean tryLock() { method in class:ReentrantLock
351 * are waiting for the lock. This is in contrast to the {@link #tryLock()}
352 * method. If you want a timed {@code tryLock} that does permit barging on
356 * if (lock.tryLock() ||
415 public boolean tryLock(long timeout, TimeUnit unit) method in class:ReentrantLock
[all...]
H A DReentrantReadWriteLock.java52 * {@link ReadLock#tryLock()} and {@link WriteLock#tryLock()} methods
524 * Performs tryLock for write, enabling barging in both modes.
545 * Performs tryLock for read, enabling barging in both modes.
758 * fair ordering policy, a call to {@code tryLock()}
764 * for this lock, then use {@link #tryLock(long, TimeUnit)
765 * tryLock(0, TimeUnit.SECONDS) } which is almost equivalent
774 public boolean tryLock() { method in class:ReentrantReadWriteLock.ReadLock
789 * lock. This is in contrast to the {@link #tryLock()}
790 * method. If you want a timed {@code tryLock} tha
846 public boolean tryLock(long timeout, TimeUnit unit) method in class:ReentrantReadWriteLock.ReadLock
1007 public boolean tryLock( ) { method in class:ReentrantReadWriteLock.WriteLock
1091 public boolean tryLock(long timeout, TimeUnit unit) method in class:ReentrantReadWriteLock.WriteLock
[all...]
/libcore/luni/src/main/java/java/nio/channels/
H A DFileChannel.java192 * <code>tryLock()</code> methods.
570 * {@code fileChannel.tryLock(0L, Long.MAX_VALUE, false);}
586 public final FileLock tryLock() throws IOException { method in class:FileChannel
587 return tryLock(0L, Long.MAX_VALUE, false);
619 public abstract FileLock tryLock(long position, long size, boolean shared) method in class:FileChannel
/libcore/luni/src/test/java/libcore/java/nio/channels/
H A DOldFileChannelTest.java209 writeOnlyFileChannel.tryLock(0, -1, false);
216 writeOnlyFileChannel.tryLock(-1, 0, false);
223 readWriteFileChannel.tryLock(-1, -1, false);
230 readWriteFileChannel.tryLock(Long.MAX_VALUE, 1, false);
239 FileLock lock = readWriteFileChannel.tryLock(tooBig, 1, false);
243 lock = readWriteFileChannel.tryLock(0, tooBig, false);
249 FileLock lockOne = readWriteFileChannel.tryLock(0, 10, false);
250 FileLock lockTwo = readWriteFileChannel.tryLock(10, 20, false);
254 lockOne = readWriteFileChannel.tryLock(0, 10, false);
1073 readWriteFileChannel.tryLock(positio
[all...]
/libcore/luni/src/main/java/java/util/concurrent/
H A DConcurrentHashMap.java282 * The maximum number of times to tryLock in a prescan before
334 HashEntry<K,V> node = tryLock() ? null :
458 while (!tryLock()) {
496 while (!tryLock()) {
520 if (!tryLock())
555 if (!tryLock())
579 if (!tryLock())
H A DThreadPoolExecutor.java600 public boolean tryLock() { return tryAcquire(1); } method in class:ThreadPoolExecutor.Worker
737 if (!t.isInterrupted() && w.tryLock()) {
H A DForkJoinTask.java550 if (lock.tryLock()) {
/libcore/luni/src/main/java/java/util/logging/
H A DFileHandler.java197 lock = channel.tryLock();
/libcore/luni/src/main/java/java/nio/
H A DFileChannelImpl.java176 public final FileLock tryLock(long position, long size, boolean shared) throws IOException { method in class:FileChannelImpl

Completed in 165 milliseconds