public static void recoverLocalElder(DistributionManager dm, Map<String, GrantorInfo> grantors,
      Set<String> needsRecovery) {
    synchronized (services) {
      for (final Map.Entry<String, DLockService> entry : services.entrySet()) {
        String serviceName = entry.getKey();
        DLockService service = entry.getValue();
        boolean foundGrantor = false;
        DLockGrantor grantor = service.getGrantor();
        if (grantor != null && grantor.getVersionId() != -1 && !grantor.isDestroyed()) {
          foundGrantor = true;
          GrantorInfo oldgi = grantors.get(serviceName);
          if (oldgi == null || oldgi.getVersionId() < grantor.getVersionId()) {
            grantors.put(serviceName, new GrantorInfo(dm.getId(), grantor.getVersionId(),
                service.getSerialNumber(), false));
            needsRecovery.remove(serviceName);
          }
        }
        if (!foundGrantor && !dm.isLoner()) {
          if (!grantors.containsKey(serviceName)) {
            needsRecovery.add(serviceName);
          }
        }
      }
    }
  }
Called when an elder is doing recovery. For every service that we are the grantor for add it to
the grantorMap For every service we have that is not in the grantorMap add its name to
needsRecovery set.

@param dm our local DM
geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockService.java