public interface LeaderSelectorListener extends ConnectionStateListener
|Modifier and Type||Method and Description|
Called when your instance has been granted leadership.
void takeLeadership(CuratorFramework client) throws Exception
It is guaranteed that there is no concurrent executions of this method.
It is guaranteed that this method will be interrupted if
CancelLeadershipException. After interrupted, this
method should exit(either return or throw) promptly, otherwise it
will block following elections.
client- the client
Exception- any errors
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.