@Test public void testUpdateLockHoldCount() throws Exception { reentrantReadWriteUpdateLock.updateLock().lock(); int hc1 = ((ReentrantReadWriteUpdateLock.UpdateLock)reentrantReadWriteUpdateLock.updateLock()).holdCount().value; reentrantReadWriteUpdateLock.updateLock().unlock(); int hc2 = ((ReentrantReadWriteUpdateLock.UpdateLock)reentrantReadWriteUpdateLock.updateLock()).holdCount().value; assertEquals(1, hc1); assertEquals(0, hc2); }
@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();  }