boolean recoverFromFile(File file) {
    if (!file.exists()) {
      logger.info("recovery file not found: {}", file.getAbsolutePath());
      return false;
    }

    logger.info("Peer locator recovering from {} with size {}",
        file.getAbsolutePath(), file.length());
    try (FileInputStream fileInputStream = new FileInputStream(file);
        ObjectInputStream ois = new ObjectInputStream(fileInputStream)) {
      int stamp = ois.readInt();
      if (stamp != LOCATOR_FILE_STAMP) {
        return false;
      }

      int version = ois.readInt();
      int currentVersion = KnownVersion.getCurrentVersion().ordinal();
      DataInputStream input;
      if (version == currentVersion) {
        input = new DataInputStream(ois);
      } else if (version > currentVersion) {
        return false;
      } else {
        KnownVersion geodeVersion =
            Versioning.getKnownVersionOrDefault(
                Versioning.getVersion((short) version),
                KnownVersion.CURRENT);
        logger.info("Peer locator found that persistent view was written with version {}",
            geodeVersion);
        if (KnownVersion.GEODE_1_11_0.equals(geodeVersion)) {
          // v1.11 did not create the file with an ObjectOutputStream, so don't use one here
          input = new VersionedDataInputStream(fileInputStream, geodeVersion);
        } else {
          input = new VersionedDataInputStream(ois, geodeVersion);
        }
      }

      // TBD - services isn't available when we recover from disk so this will throw an NPE
      // recoveredView = (GMSMembershipView) services.getSerializer().readDSFID(input);
      recoveredView = objectDeserializer.readObject(input);

      // this is not a valid view so it shouldn't have a usable Id
      recoveredView.setViewId(-1);
      List<ID> members = new ArrayList<>(recoveredView.getMembers());
      // Remove locators from the view. Since we couldn't recover from an existing
      // locator we know that all of the locators in the view are defunct
      for (ID member : members) {
        if (member.getVmKind() == MemberIdentifier.LOCATOR_DM_TYPE) {
          recoveredView.remove(member);
        }
      }

      logger.info("Peer locator recovered membership is {}", recoveredView);
      return true;

    } catch (Throwable e) {
      String message =
          String.format("Unable to recover previous membership view from %s", file);
      logger.warn(message, e);
      if (!file.delete() && file.exists()) {
        logger.warn("Peer locator was unable to recover from or delete {}", file);
        viewFile = null;
      }
      throw new IllegalStateException(message, e);
    }
  }
Called initially and after each auto-reconnect. See restart handlers in InternalLocator
up in geode-core. Services must be started before this call.
geode-membership/src/main/java/org/apache/geode/distributed/internal/membership/gms/locator/GMSLocator.java