Class ZooKeeperLeaderElectionDriverFactory
- java.lang.Object
-
- org.apache.flink.runtime.leaderelection.ZooKeeperLeaderElectionDriverFactory
-
- All Implemented Interfaces:
LeaderElectionDriverFactory
public class ZooKeeperLeaderElectionDriverFactory extends Object implements LeaderElectionDriverFactory
Factory forZooKeeperLeaderElectionDriver.
-
-
Constructor Summary
Constructors Constructor Description ZooKeeperLeaderElectionDriverFactory(org.apache.flink.shaded.curator5.org.apache.curator.framework.CuratorFramework curatorFramework)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ZooKeeperLeaderElectionDrivercreate(LeaderElectionDriver.Listener leaderElectionListener)Creates aLeaderElectionDriverfor the given leader contender description.
-
-
-
Method Detail
-
create
public ZooKeeperLeaderElectionDriver create(LeaderElectionDriver.Listener leaderElectionListener) throws Exception
Description copied from interface:LeaderElectionDriverFactoryCreates aLeaderElectionDriverfor the given leader contender description. Moreover, it registers the given leader election listener with the service.- Specified by:
createin interfaceLeaderElectionDriverFactory- Parameters:
leaderElectionListener- listener for the callbacks of theLeaderElectionDriver- Returns:
- created
LeaderElectionDriverinstance - Throws:
Exception- if the creation fails
-
-