public Iterator<TsFileResource> getIterator(boolean sequence) {
    readLock();
    try {
      return getTsFileList(sequence).iterator();
    } finally {
      readUnlock();
    }
  }
@param sequence {@code true} for sequence, {@code false} for unsequence
@param timePartitions {@code null} for all time partitions, empty for zero time partitions
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/tsfile/TsFileManager.java