private LockGrantorId waitForLockGrantorFutureResult(
      FutureResult<LockGrantorId> lockGrantorFutureResultRef,
      long timeToWait, final TimeUnit timeUnit) {
    LockGrantorId lockGrantorIdRef = null;
    while (lockGrantorIdRef == null) {
      boolean interrupted = Thread.interrupted();
      try {
        checkDestroyed();
        if (timeToWait == 0) {
          lockGrantorIdRef = lockGrantorFutureResultRef.get();
        } else {
          lockGrantorIdRef = lockGrantorFutureResultRef.get(timeToWait, timeUnit);
        }
      } catch (TimeoutException e) {
        break;
      } catch (InterruptedException e) {
        interrupted = true;
        dm.getCancelCriterion().checkCancelInProgress(e);
        if (lockGrantorFutureResultRef.isCancelled()) {
          // cancelled Future might throw InterruptedException...?
          checkDestroyed();
          break; // return null
        }
      } catch (CancellationException e) { // Future was cancelled
        checkDestroyed();
        break; // return null
      } finally {
        if (interrupted) {
          Thread.currentThread().interrupt();
        }
      }
    }
    return lockGrantorIdRef;
  }
Returns lockGrantorId when lockGrantorFutureResultRef has been set by another thread.

@param lockGrantorFutureResultRef FutureResult to wait for
@param timeToWait how many ms to wait, 0 = forever
@param timeUnit the unit of measure for timeToWait
@return the LockGrantorId or null if FutureResult was cancelled
geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java