Package io.kroxylicious.proxy.topology
Interface PartitionLeaders
public interface PartitionLeaders
A snapshot of partition leader assignments, returned by
TopologyService.leaders(java.util.Map<java.lang.String, java.util.Set<java.lang.String>>).
This is a self-contained result — callers should use it directly rather than querying the topology cache separately. The snapshot is immutable and safe to use across async callback boundaries.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the leader for the given topic-partition, or empty if the leader was not discovered (e.g. the topic does not exist, or the partition has no leader).
-
Method Details
-
leaderOf
Returns the leader for the given topic-partition, or empty if the leader was not discovered (e.g. the topic does not exist, or the partition has no leader).- Parameters:
topicName- the topic namepartitionIndex- the partition index- Returns:
- the leader's virtual node, or empty
-