public synchronized void write(T schemaPlan) throws IOException {
    hasSynced = false;
    // serialize plan to binary data
    serializer.serialize(schemaPlan, fileOutputStream);
    if (forceEachWrite) {
      syncBufferToDisk();
    }
  }
This class provides the common ability to write a log storing T.

@param <T> the generic type
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/schemaengine/schemaregion/logfile/SchemaLogWriter.java