@Test public void testUpdateLockIsExclusive() throws Exception { assertTrue(executor1.submit(new TryLockTask(reentrantReadWriteUpdateLock.updateLock())).get()); assertFalse(executor2.submit(new TryLockTask(reentrantReadWriteUpdateLock.updateLock())).get()); assertTrue(executor1.submit(new UnlockTask(reentrantReadWriteUpdateLock.updateLock())).get()); assertTrue(executor2.submit(new TryLockTask(reentrantReadWriteUpdateLock.updateLock())).get()); assertTrue(executor2.submit(new UnlockTask(reentrantReadWriteUpdateLock.updateLock())).get()); }
@Override public Lock updateLock() { return updateLock; }
ReentrantReadWriteUpdateLock implements ReadWriteUpdateLock { @Override public Lock updateLock() { return updateLock; } }
ReentrantReadWriteUpdateLock implements ReadWriteUpdateLock { @Override public Lock updateLock() { return updateLock; }  }
ReentrantReadWriteUpdateLock implements ReadWriteUpdateLock { @Override public Lock updateLock() { return updateLock; }  @Override Lock updateLock(); @Override Lock readLock(); @Override Lock writeLock(); }
ReentrantReadWriteUpdateLock implements ReadWriteUpdateLock { @Override public Lock updateLock() { return updateLock; }  @Override Lock updateLock(); @Override Lock readLock(); @Override Lock writeLock();  }