private void saveView(GMSMembershipView<ID> view) {
    if (viewFile == null) {
      return;
    }
    if (!viewFile.delete() && viewFile.exists()) {
      logger.warn("Peer locator is unable to delete persistent membership information in {}",
          viewFile.getAbsolutePath());
    }
    try (FileOutputStream fileStream = new FileOutputStream(viewFile);
        ObjectOutputStream oos = new ObjectOutputStream(fileStream)) {
      oos.writeInt(LOCATOR_FILE_STAMP);
      oos.writeInt(KnownVersion.getCurrentVersion().ordinal());
      oos.flush();
      DataOutputStream dataOutputStream = new DataOutputStream(oos);
      objectSerializer.writeObject(view, dataOutputStream);
    } catch (Exception e) {
      logger.warn(
          "Peer locator encountered an error writing current membership to disk.  Disabling persistence.  Care should be taken when bouncing this locator as it will not be able to recover knowledge of the running distributed system",
          e);
      viewFile = null;
    }
  }
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