@Override
    public void lockInterruptibly() throws InterruptedException {
      readerSemaphore.acquire();
      try {
        numReaders++;
        if (numReaders == 1) {
          writerSemaphore.acquire();
        }
      } finally {
        // in case writeSemaphore.acquire throws Exception
        readerSemaphore.release();
      }
    }
This ReadWriteLock is useful when different threads need to lock and unlock the read lock. This
is <b>NOT</b> a reentrant lock.
geode-core/src/main/java/org/apache/geode/internal/util/concurrent/SemaphoreReadWriteLock.java