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 ZooKeeperLeaderElectionDriver
create(LeaderElectionDriver.Listener leaderElectionListener)
Creates aLeaderElectionDriver
for the given leader contender description.
-
-
-
Method Detail
-
create
public ZooKeeperLeaderElectionDriver create(LeaderElectionDriver.Listener leaderElectionListener) throws Exception
Description copied from interface:LeaderElectionDriverFactory
Creates aLeaderElectionDriver
for the given leader contender description. Moreover, it registers the given leader election listener with the service.- Specified by:
create
in interfaceLeaderElectionDriverFactory
- Parameters:
leaderElectionListener
- listener for the callbacks of theLeaderElectionDriver
- Returns:
- created
LeaderElectionDriver
instance - Throws:
Exception
- if the creation fails
-
-