(leader leader-latch)
(leader-latch curator-framework
path
leaderfn
&
{:keys [participant-id notleaderfn close-mode]
:or {participant-id (str (UUID/randomUUID))
notleaderfn (constantly nil)}})
Creates a Leader Latch. path: The path in ZooKeeper for storing this leadership group leaderfn: Function that will be called when the current process becomes leader. This function should block and only return when the process wishes to release leadership to someone else. notleaderfn: Optional function that will be called when the connection state changes and we are not the leader. participant-id: Uniquely identifies this participant. Defaults to UUID/randomUUID
Creates a Leader Latch. path: The path in ZooKeeper for storing this leadership group leaderfn: Function that will be called when the current process becomes leader. This function should block and only return when the process wishes to release leadership to someone else. notleaderfn: Optional function that will be called when the connection state changes and we are not the leader. participant-id: Uniquely identifies this participant. Defaults to UUID/randomUUID
(leader? leader-latch)
(listener leaderfn notleaderfn)
(participants leader-latch)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close