@Override
        public boolean isTopicPartitionAllowed(TopicPartition partition) {
            return isTopicAllowed(partition.topic()) && partitionFilter.isPartitionAllowed(partition.partition());
        }
Used to filter topic-partitions based on a certain criteria, for example, a topic pattern and a set of partition ids.
server-common/src/main/java/org/apache/kafka/server/util/TopicPartitionFilter.java