/** * Ensures that the current thread doesn't hold any read locks. If * the thread holds any read locks, this method throws a {@link javax.ejb.IllegalLoopbackException}. * If no read locks are held, then this method delegates the call to the * internal delegate {@link java.util.concurrent.locks.ReentrantReadWriteLock} */ @Override public void lockInterruptibly() throws InterruptedException { checkLoopback(); delegate.writeLock().lockInterruptibly(); }
/** * Internal lock routine. * * @param canInterrupt Whether to acquire the lock interruptibly. * @throws InterruptedException If interrupted. */ private void lock0(boolean canInterrupt) throws InterruptedException { int i = 0; try { for (; i < locks.length; i++) { if (canInterrupt) locks[i].writeLock().lockInterruptibly(); else locks[i].writeLock().lock(); } } catch (InterruptedException e) { unlock0(i - 1); throw e; } }
public void writeLockInterruptibly() throws InterruptedException { coarseLock.writeLock().lockInterruptibly(); if (coarseLock.getWriteHoldCount() == 1) { writeLockHeldTimeStampNanos = timer.monotonicNowNanos(); } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }
@Override public void lockInterruptibly() throws InterruptedException { forceSpin = true; super.lockInterruptibly(); }
public void writeLockInterruptibly() throws InterruptedException { coarseLock.writeLock().lockInterruptibly(); if (coarseLock.getWriteHoldCount() == 1) { writeLockHeldTimeStampNanos = timer.monotonicNowNanos(); } }
@Override public void lockInterruptibly() throws InterruptedException { boolean locked = false; while (!locked) { readers.writeLock().lockInterruptibly(); locked = writers.readLock().tryLock(); readers.writeLock().unlock(); if(!locked) { Thread.yield(); } } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }
@Override public void lockInterruptibly() throws InterruptedException { aboutToAcquire(readWriteLock); try { super.lockInterruptibly(); } finally { lockStateChanged(readWriteLock); } }