public long getAssignedTimePartitionSlotsCount(String database) {
    return Optional.ofNullable(databasePartitionTables.get(database))
        .map(DatabasePartitionTable::getTimeSlotCount)
        .orElse(0L);
  }
Only leader use this interface.

<p>Get the assigned TimePartitionSlots count in the specified Database

@param database The specified Database
@return The assigned TimePartitionSlots count
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/persistence/partition/PartitionInfo.java