public void lock() {
      boolean interrupted = Thread.interrupted();
      try {
        for (;;) {
          try {
            lockInterruptibly();
            break;
          } catch (InterruptedException e) {
            interrupted = true;
          }
        } // for
      } finally {
        if (interrupted) {
          Thread.currentThread().interrupt();
        }
      }
    }
Create a new read lock from the given lock

@param lock the lock to be used
@param stopper the cancellation criterion
geode-core/src/main/java/org/apache/geode/internal/util/concurrent/StoppableReentrantReadWriteLock.java