public static DLockGrantor waitForGrantor(DLockService svc) throws InterruptedException {
    if (svc == null) {
      return null;
    }
    // now we need to get the grantor and make sure it's ready...
    DLockGrantor oldGrantor = null;
    DLockGrantor grantor = getGrantorForService(svc);
    do {
      if (grantor == null || grantor.isDestroyed()) {
        return null;
      }
      grantor.waitWhileInitializing();
      if (svc.isDestroyed()) {
        return null;
      }
      // make sure we are lock grantor
      if (!svc.isCurrentlyOrIsMakingLockGrantor()) {
        return null;
      }
      if (!grantor.isReady()) {
        return null;
      }
      // Now make sure the service still has this member as its grantor
      oldGrantor = grantor;
      grantor = getGrantorForService(svc);
    } while (oldGrantor != grantor);
    return grantor;
  }
Returns instance of DLockGrantor that will handle distributed lock granting for specified
service.
<p>
Returns null if unable to get ready grantor or if this process is not the grantor for the
service.

@param svc the lock service to return the grantor instance for
geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockGrantor.java