C# Class Kafka.Client.ZooKeeperIntegration.Listeners.BrokerTopicsListener

Listens to new broker registrations under a particular topic, in zookeeper and keeps the related data structures updated
Inheritance: IZooKeeperChildListener
Afficher le fichier Open project: precog/kafka Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

BrokerTopicsListener() public méthode

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.
Résultat System

HandleChildChange() public méthode

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). ///
Résultat void

ResetState() public méthode

Resets the state of listener.
public ResetState ( ) : void
Résultat void