class TsFileWriter implements AutoCloseable {

  public boolean write(TSRecord record) throws IOException, WriteProcessException {
    // make sure the ChunkGroupWriter for this TSRecord exist
    checkIsTimeSeriesExist(record);
    // get corresponding ChunkGroupWriter and write this TSRecord
    groupWriters.get(record.deviceId).write(record.time, record.dataPointList);
    ++recordCount;
    return checkMemorySizeAndMayFlushChunks();
  }

  public  TsFileWriter(File file);
  public  TsFileWriter(TsFileIOWriter fileWriter);
  public  TsFileWriter(File file, Schema schema);
  public  TsFileWriter(TsFileOutput output, Schema schema);
  public  TsFileWriter(File file, Schema schema, TSFileConfig conf);
  protected  TsFileWriter(TsFileIOWriter fileWriter, Schema schema, TSFileConfig conf);

}