(interrupt-leadership leader-selector)Attempt to cancel current leadership if we currently have leadership
Attempt to cancel current leadership if we currently have leadership
(leader-selector curator-framework
path
leaderfn
&
{:keys [participant-id losingfn]
:or {participant-id (str (UUID/randomUUID))
losingfn (constantly nil)}})Creates a Leader Selector. 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. losingfn: Optional function that will be called when the connection state changes indicating we're going to lose leadership. participant-id: Uniquely identifies this participant. Defaults to UUID/randomUUID
Creates a Leader Selector. 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. losingfn: Optional function that will be called when the connection state changes indicating we're going to lose leadership. participant-id: Uniquely identifies this participant. Defaults to UUID/randomUUID
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |