public class ElectionRegistry extends Object
| Constructor and Description |
|---|
ElectionRegistry(ZKClient zkClient) |
| Modifier and Type | Method and Description |
|---|---|
Cancellable |
register(String name,
ElectionHandler handler)
Creates a new
LeaderElection for the given arguments, starts the service, and adds it to the registry. |
void |
shutdown()
Stops all active
LeaderElection processes. |
public ElectionRegistry(ZKClient zkClient)
public Cancellable register(String name, ElectionHandler handler)
LeaderElection for the given arguments, starts the service, and adds it to the registry.name - Name for the election.handler - Callback to handle leader and follower transitions.public void shutdown()
LeaderElection processes.Copyright © 2013-2020 The Apache Software Foundation. All rights reserved.