public interface LeaderElectionDriverFactory
LeaderElectionDriver
with different implementation.Modifier and Type | Method and Description |
---|---|
LeaderElectionDriver |
createLeaderElectionDriver(LeaderElectionEventHandler leaderEventHandler,
FatalErrorHandler fatalErrorHandler,
String leaderContenderDescription)
Create a specific
LeaderElectionDriver and start the necessary services. |
LeaderElectionDriver createLeaderElectionDriver(LeaderElectionEventHandler leaderEventHandler, FatalErrorHandler fatalErrorHandler, String leaderContenderDescription) throws Exception
LeaderElectionDriver
and start the necessary services. For example,
LeaderLatch and NodeCache in Zookeeper, KubernetesLeaderElector and ConfigMap watcher in
Kubernetes.leaderEventHandler
- handler for the leader election driver to process leader events.leaderContenderDescription
- leader contender description.fatalErrorHandler
- fatal error handlerException
- when create a specific LeaderElectionDriver
implementation and
start the necessary services.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.