Liking cljdoc? Tell your friends :D

curator.leader-latch


leaderclj

(leader leader-latch)

leader-latchclj

(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
raw docstring

leader?clj

(leader? leader-latch)

listenerclj

(listener leaderfn notleaderfn)

participantsclj

(participants leader-latch)

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close