kiel.zookeeper.shared_set
¶kiel.zookeeper.shared_set.
SharedSet
(client, path, on_change)[source]¶Bases: object
A simple “set” construct in Zookeeper with locking and change callbacks.
Used by the Zookeeper-based GroupedConsumer
to represent the shared set
of topic partitions divvied up among the group.
lock_path
¶Property representing the znode path of the shared lock.
add_items
(new_items)[source]¶Updates the shared set’s data with the given new items added.
If all of the given items are already present, no data is updated.
Works entirely behind a zookeeper lock to combat resource contention among sharers of the set.