public BrokerTopicsListener(
IZooKeeperClient zkclient,
IDictionary<string, SortedSet<Partition>> actualBrokerTopicsPartitionsMap,
IDictionary<int, Broker> actualBrokerIdMap,
Action<int, string, int> callback)
{
this.zkclient = zkclient;
this.actualBrokerTopicsPartitionsMap = actualBrokerTopicsPartitionsMap;
this.actualBrokerIdMap = actualBrokerIdMap;
this.callback = callback;
this.oldBrokerIdMap = new Dictionary<int, Broker>(this.actualBrokerIdMap);
this.oldBrokerTopicsPartitionsMap = new Dictionary<string, SortedSet<Partition>>(this.actualBrokerTopicsPartitionsMap);
Logger.Debug("Creating broker topics listener to watch the following paths - \n"
+ "/broker/topics, /broker/topics/topic, /broker/ids");
Logger.Debug("Initialized this broker topics listener with initial mapping of broker id to "
+ "partition id per topic with " + this.oldBrokerTopicsPartitionsMap.ToMultiString(
x => x.Key + " --> " + x.Value.ToMultiString(y => y.ToString(), ","), "; "));
}