private synchronized void sampleLockUsage() {
    final ReentrantReadWriteLock lock = lockToMonitor.get();
    if (lock != null) {
      final boolean isWriteLocked = lock.isWriteLocked();
      final int queueLength = lock.getQueueLength();

      final int competingThreads = queueLength + (isWriteLocked ? 1 : lock.getReadLockCount());
      competingThreadsHisto.recordValue(competingThreads);
    }
  }
private synchronized void sampleLockUsage()