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

12

/openjdk7/jdk/src/share/classes/java/util/concurrent/locks/
H A DLock.java97 * #tryLock()}), an attempt to acquire the lock that can be
99 * the lock that can timeout ({@link #tryLock(long, TimeUnit)}).
244 * if (lock.tryLock()) {
260 boolean tryLock(); method in interface:Lock
320 boolean tryLock(long time, TimeUnit unit) throws InterruptedException; method in interface:Lock
H A DReentrantLock.java68 * Also note that the untimed {@link #tryLock() tryLock} method does not
129 * Performs non-fair tryLock. tryAcquire is
350 * fair ordering policy, a call to {@code tryLock()} <em>will</em>
356 * {@link #tryLock(long, TimeUnit) tryLock(0, TimeUnit.SECONDS) }
369 public boolean tryLock() { method in class:ReentrantLock
382 * are waiting for the lock. This is in contrast to the {@link #tryLock()}
383 * method. If you want a timed {@code tryLock} that does permit barging on
386 * <pre>if (lock.tryLock() || loc
443 public boolean tryLock(long timeout, TimeUnit unit) method in class:ReentrantLock
[all...]
H A DReentrantReadWriteLock.java82 * {@link ReadLock#tryLock()} and {@link WriteLock#tryLock()} methods
554 * Performs tryLock for write, enabling barging in both modes.
575 * Performs tryLock for read, enabling barging in both modes.
786 * fair ordering policy, a call to {@code tryLock()}
792 * for this lock, then use {@link #tryLock(long, TimeUnit)
793 * tryLock(0, TimeUnit.SECONDS) } which is almost equivalent
802 public boolean tryLock() { method in class:ReentrantReadWriteLock.ReadLock
817 * lock. This is in contrast to the {@link #tryLock()}
818 * method. If you want a timed {@code tryLock} tha
871 public boolean tryLock(long timeout, TimeUnit unit) method in class:ReentrantReadWriteLock.ReadLock
1032 public boolean tryLock( ) { method in class:ReentrantReadWriteLock.WriteLock
1113 public boolean tryLock(long timeout, TimeUnit unit) method in class:ReentrantReadWriteLock.WriteLock
[all...]
/openjdk7/jdk/test/java/nio/channels/FileChannel/
H A DLock.java69 lock = channel.tryLock();
144 fc2.tryLock();
173 fc.tryLock().release();
174 fc.tryLock(0L, 1L, false).release();
179 fc.tryLock().release();
180 fc.tryLock(0L, 1L, false).release();
192 if (fc.tryLock(10, 10, false) == null) {
195 FileLock lock = fc.tryLock(0, 10, false);
H A DTryLock.java64 fl = fc.tryLock(0, fc.size(), shared);
87 fl = fc.tryLock(0, fc.size(), shared);
110 fl = fc.tryLock(0, fc.size(), shared);
/openjdk7/jdk/src/share/classes/java/nio/channels/
H A DAsynchronousFileChannel.java599 * @see #tryLock()
601 public abstract FileLock tryLock(long position, long size, boolean shared) method in class:AsynchronousFileChannel
607 * <p> An invocation of this method of the form {@code ch.tryLock()}
611 * ch.{@link #tryLock(long,long,boolean) tryLock}(0L, Long.MAX_VALUE, false) </pre>
632 * @see #tryLock(long,long,boolean)
634 public final FileLock tryLock() throws IOException { method in class:AsynchronousFileChannel
635 return tryLock(0L, Long.MAX_VALUE, false);
H A DFileChannel.java1007 * @see #tryLock()
1008 * @see #tryLock(long,long,boolean)
1048 * @see #tryLock()
1049 * @see #tryLock(long,long,boolean)
1073 * {@link #tryLock()} method simply locks a region of size {@link
1119 * @see #tryLock()
1121 public abstract FileLock tryLock(long position, long size, boolean shared) method in class:FileChannel
1127 * <p> An invocation of this method of the form <tt>fc.tryLock()</tt>
1131 * fc.{@link #tryLock(long,long,boolean) tryLock}(
1153 public final FileLock tryLock() throws IOException { method in class:FileChannel
[all...]
/openjdk7/jdk/test/java/util/concurrent/locks/Lock/
H A DFlakyMutex.java78 try { check(! m.tryLock()); }
81 try { check(! m.tryLock(1, TimeUnit.MICROSECONDS)); }
123 public boolean tryLock() { return sync.tryAcquire(1); } method in class:FlakyMutex
127 public boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException { method in class:FlakyMutex
H A DTimedAcquireLeak.java225 check(! lock.tryLock(t, NANOSECONDS));
226 check(! readLock.tryLock(t, NANOSECONDS));
227 check(! writeLock.tryLock(t, NANOSECONDS));
/openjdk7/jdk/src/share/classes/sun/java2d/pipe/
H A DRenderQueue.java120 public final boolean tryLock() { method in class:RenderQueue
/openjdk7/jdk/test/java/util/concurrent/locks/ReentrantLock/
H A DTimeoutLockLoops.java95 while (!lock.tryLock()); // Jam lock
123 if (!lock.tryLock(TIMEOUT, TimeUnit.MILLISECONDS))
/openjdk7/jdk/test/java/util/concurrent/locks/ReentrantReadWriteLock/
H A DBug6571733.java48 check(! lock.writeLock().tryLock(0, TimeUnit.DAYS));
H A DCount.java45 case 2: check(lock.tryLock()); break;
46 case 3: check(lock.tryLock(45, TimeUnit.MINUTES)); break;
/openjdk7/jdk/test/java/lang/management/ThreadMXBean/
H A DMyOwnSynchronizer.java139 public boolean tryLock() { return sync.tryAcquire(1); } method in class:MyOwnSynchronizer.Mutex
147 public boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException { method in class:MyOwnSynchronizer.Mutex
/openjdk7/jdk/src/share/classes/sun/java2d/opengl/
H A DOGLRenderQueue.java217 if (!needsFlush && (timedOut = tryLock())) {
/openjdk7/jdk/test/java/lang/management/ManagementFactory/
H A DThreadMXBeanProxy.java225 public boolean tryLock() { return sync.tryAcquire(1); } method in class:ThreadMXBeanProxy.Mutex
233 public boolean tryLock(long timeout, TimeUnit unit) throws InterruptedException { method in class:ThreadMXBeanProxy.Mutex
/openjdk7/jdk/src/share/classes/java/util/concurrent/
H A DConcurrentHashMap.java380 * The maximum number of times to tryLock in a prescan before
432 HashEntry<K,V> node = tryLock() ? null :
556 while (!tryLock()) {
594 while (!tryLock()) {
618 if (!tryLock())
653 if (!tryLock())
677 if (!tryLock())
H A DThreadPoolExecutor.java642 public boolean tryLock() { return tryAcquire(1); } method in class:ThreadPoolExecutor.Worker
785 if (!t.isInterrupted() && w.tryLock()) {
H A DForkJoinTask.java579 if (lock.tryLock()) {
/openjdk7/jdk/test/java/nio/channels/AsynchronousFileChannel/
H A DBasic.java175 // test 1 - acquire lock and check that tryLock throws
187 ch.tryLock();
194 fl = ch.tryLock();
/openjdk7/jdk/src/share/classes/java/util/logging/
H A DFileHandler.java414 available = fc.tryLock() != null;
/openjdk7/jdk/src/share/classes/sun/nio/ch/
H A DSimpleAsynchronousFileChannelImpl.java244 public FileLock tryLock(long position, long size, boolean shared) method in class:SimpleAsynchronousFileChannelImpl
/openjdk7/jdk/src/windows/classes/sun/java2d/d3d/
H A DD3DSurfaceData.java742 if (!rq.tryLock()) {
/openjdk7/jdk/src/windows/classes/sun/nio/ch/
H A DWindowsAsynchronousFileChannelImpl.java342 public FileLock tryLock(long position, long size, boolean shared) method in class:WindowsAsynchronousFileChannelImpl
/openjdk7/jdk/src/share/classes/sun/security/ssl/
H A DSSLSocketImpl.java751 if (writeLock.tryLock(getSoLinger(), TimeUnit.SECONDS)) {

Completed in 375 milliseconds

12