@Test public void createsRegularLockIfDebugIsDisabled() { Configuration config = createNiceMock(Configuration.class); expect(config.isServerLocksProfilingEnabled()).andReturn(false); replayAll(); LockFactory factory = new LockFactory(config); Lock lock = factory.newLock(); Assert.assertTrue(lock instanceof ReentrantLock); verifyAll(); }
public Lock newLock() { return newLock(getDefaultPrefix()); }
LockFactory { public Lock newLock() { return newLock(getDefaultPrefix()); } }
LockFactory { public Lock newLock() { return newLock(getDefaultPrefix()); } @Inject  LockFactory(Configuration config); }
LockFactory { public Lock newLock() { return newLock(getDefaultPrefix()); } @Inject  LockFactory(Configuration config); Lock newLock(); Lock newLock(String label); ReadWriteLock newReadWriteLock(); ReadWriteLock newReadWriteLock(String label); void debugDump(StringBuilder sb); }
LockFactory { public Lock newLock() { return newLock(getDefaultPrefix()); } @Inject  LockFactory(Configuration config); Lock newLock(); Lock newLock(String label); ReadWriteLock newReadWriteLock(); ReadWriteLock newReadWriteLock(String label); void debugDump(StringBuilder sb);  }