public KafkaFuture<Map<TopicPartition, Optional<Throwable>>> partitions() {
        return electionFuture;
    }
<p>Get a future for the topic partitions for which a leader election was attempted.
If the election succeeded then the value for a topic partition will be the empty Optional.
Otherwise the election failed and the Optional will be set with the error.</p>
clients/src/main/java/org/apache/kafka/clients/admin/ElectLeadersResult.java