com.netflix.curator.framework.recipes.leader
Interface LeaderSelectorListener
- All Superinterfaces:
- com.netflix.curator.framework.state.ConnectionStateListener
public interface LeaderSelectorListener
- extends com.netflix.curator.framework.state.ConnectionStateListener
Notification for leadership
- See Also:
LeaderSelector
|
Method Summary |
void |
takeLeadership(com.netflix.curator.framework.CuratorFramework client)
Called when your instance has been granted leadership. |
| Methods inherited from interface com.netflix.curator.framework.state.ConnectionStateListener |
stateChanged |
takeLeadership
void takeLeadership(com.netflix.curator.framework.CuratorFramework client)
throws java.lang.Exception
- Called when your instance has been granted leadership. This method
should not return until you wish to release leadership
- Parameters:
client - the client
- Throws:
java.lang.Exception - any errors