private void writeIFRecord(HeapDataOutputStream hdos, boolean doStats) throws IOException {
    assert lock.isHeldByCurrentThread();
    checkClosed();

    hdos.sendTo(ifRAF);
    if (logger.isTraceEnabled(LogMarker.PERSIST_WRITES_VERBOSE)) {
      logger.trace(LogMarker.PERSIST_WRITES_VERBOSE, "DiskInitFile writeIFRecord HDOS");
    }
    if (doStats) {
      ifLiveRecordCount++;
      ifTotalRecordCount++;
    }
    compactIfNeeded();
  }
Write the specified DataSerializer to the file.
geode-core/src/main/java/org/apache/geode/internal/cache/DiskInitFile.java