List of usage examples for org.springframework.integration.zookeeper.config LeaderInitiatorFactoryBean setPath
public LeaderInitiatorFactoryBean setPath(String path)
From source file:com.netflix.genie.web.configs.LeadershipConfig.java
/** * The leadership initialization factory bean which will create a LeaderInitiator to kick off the leader election * process within this node for the cluster if Zookeeper is configured. * * @param client The curator framework client to use * @param zookeeperProperties The Zookeeper properties to use * @return The factory bean/* w ww . j av a 2s . co m*/ */ @Bean @ConditionalOnProperty("genie.zookeeper.enabled") public LeaderInitiatorFactoryBean leaderInitiatorFactory(final CuratorFramework client, final ZookeeperProperties zookeeperProperties) { final LeaderInitiatorFactoryBean factoryBean = new LeaderInitiatorFactoryBean(); factoryBean.setClient(client); factoryBean.setPath(zookeeperProperties.getLeader().getPath()); factoryBean.setRole("cluster"); return factoryBean; }