Interface LeaderRetrievalDriverFactory
-
- All Known Implementing Classes:
KubernetesLeaderRetrievalDriverFactory
,ZooKeeperLeaderRetrievalDriverFactory
public interface LeaderRetrievalDriverFactory
Factory for creatingLeaderRetrievalDriver
with different implementation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LeaderRetrievalDriver
createLeaderRetrievalDriver(LeaderRetrievalEventHandler leaderEventHandler, FatalErrorHandler fatalErrorHandler)
Create a specificLeaderRetrievalDriver
and start the necessary services.
-
-
-
Method Detail
-
createLeaderRetrievalDriver
LeaderRetrievalDriver createLeaderRetrievalDriver(LeaderRetrievalEventHandler leaderEventHandler, FatalErrorHandler fatalErrorHandler) throws Exception
Create a specificLeaderRetrievalDriver
and start the necessary services. For example, NodeCache in Zookeeper, ConfigMap watcher in Kubernetes. They could get the leader information change events and need to notify the leader listener byLeaderRetrievalEventHandler
.- Parameters:
leaderEventHandler
- handler for the leader retrieval driver to notify leader change events.fatalErrorHandler
- fatal error handler- Throws:
Exception
- when create a specificLeaderRetrievalDriver
implementation and start the necessary services.
-
-