public Optional<TConsensusGroupType> getRegionType(int regionId) {
    return databasePartitionTables.values().stream()
        .map(databasePartitionTable -> databasePartitionTable.getRegionType(regionId))
        .filter(Optional::isPresent)
        .map(Optional::get)
        .findFirst();
  }
Get the timePartition of the specific Database or seriesSlotId(device) or regionId.

@param plan GetRegionIdPlan with the specific Database ,seriesSlotId(device) , regionId.
@return GetRegionIdResp with STATUS and List{@literal <}TTimePartitionSlot{@literal >}.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/PartitionInfo.java