private void checkClosed() {
    if (closed) {
      parent.getCache().getCancelCriterion().checkCancelInProgress();

      if (parent.isClosed() || parent.isClosing()) {
        throw new CacheClosedException("The disk store is closed or closing");
      }

      DiskAccessException dae = new DiskAccessException("The disk init file is closed", parent);
      parent.handleDiskAccessException(dae);

      throw dae;
    }
  }
Write the specified DataSerializer to the file.
geode-core/src/main/java/org/apache/geode/internal/cache/DiskInitFile.java