Interface BrokerTopologyManager

All Superinterfaces:
ClusterConfigurationUpdateNotifier.ClusterConfigurationUpdateListener
All Known Implementing Classes:
BrokerTopologyManagerImpl

public interface BrokerTopologyManager extends ClusterConfigurationUpdateNotifier.ClusterConfigurationUpdateListener
  • Method Details

    • getTopology

      BrokerClusterState getTopology()
      Returns live topology that includes which brokers are available, who is leader for each partition, etc.
    • getClusterConfiguration

      ClusterConfiguration getClusterConfiguration()
      Returns the current cluster topology. The topology contains the information about brokers which are part of the cluster, and the partition distribution. Unlike BrokerClusterState this also includes information about brokers which are currently unreachable.
    • addTopologyListener

      void addTopologyListener(BrokerTopologyListener listener)
      Adds the topology listener. For each existing brokers, the listener will be notified via BrokerTopologyListener.brokerAdded(MemberId). After that, the listener gets notified of every new broker added or removed events.
      Parameters:
      listener - the topology listener
    • removeTopologyListener

      void removeTopologyListener(BrokerTopologyListener listener)
      Removes the given topology listener by identity.
      Parameters:
      listener - the listener to remove