C# Класс Kafka.Client.ZooKeeperIntegration.Listeners.BrokerTopicsListener

Listens to new broker registrations under a particular topic, in zookeeper and keeps the related data structures updated
Наследование: IZooKeeperChildListener
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BrokerTopicsListener ( IZooKeeperClient zkclient, IDictionary actualBrokerTopicsPartitionsMap, Broker>.IDictionary actualBrokerIdMap, Action callback ) : System

Initializes a new instance of the BrokerTopicsListener class.

HandleChildChange ( ZooKeeperChildChangedEventArgs e ) : void

Called when the children of the given path changed

ResetState ( ) : void

Resets the state of listener.

Приватные методы

Метод Описание
ProcessBrokerChange ( string path, IEnumerable childs ) : void

Processes change in the broker lists.

ProcessNewBrokerInExistingTopic ( string topic, IEnumerable childs ) : void

Generate the updated mapping of (brokerId, numPartitions) for the new list of brokers registered under some topic.

Описание методов

BrokerTopicsListener() публичный Метод

Initializes a new instance of the BrokerTopicsListener class.
public BrokerTopicsListener ( IZooKeeperClient zkclient, IDictionary actualBrokerTopicsPartitionsMap, Broker>.IDictionary actualBrokerIdMap, Action callback ) : System
zkclient IZooKeeperClient The wrapper on ZooKeeper client.
actualBrokerTopicsPartitionsMap IDictionary The actual broker topics partitions map.
actualBrokerIdMap Broker>.IDictionary The actual broker id map.
callback Action The callback invoked after new broker is added.
Результат System

HandleChildChange() публичный Метод

Called when the children of the given path changed
public HandleChildChange ( ZooKeeperChildChangedEventArgs e ) : void
e Kafka.Client.ZooKeeperIntegration.Events.ZooKeeperChildChangedEventArgs The instance containing the event data /// as parent path and children (null if parent was deleted). ///
Результат void

ResetState() публичный Метод

Resets the state of listener.
public ResetState ( ) : void
Результат void