Last active
October 11, 2015 23:28
-
-
Save ericacm/3935895 to your computer and use it in GitHub Desktop.
selectLeader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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