Skip to content

Instantly share code, notes, and snippets.

@ericacm
Last active October 11, 2015 23:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericacm/3935895 to your computer and use it in GitHub Desktop.
Save ericacm/3935895 to your computer and use it in GitHub Desktop.
selectLeader
def selectLeader() {
leaderLatch = new LeaderLatch(curatorFramework, leaderPath, nodeId)
leaderLatch.start()
// Optional, only if you need notification on cluster changes
watchLeaderChildren()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment