public class LeaderInitiatorFactoryBean extends Object implements FactoryBean<LeaderInitiator>, SmartLifecycle, InitializingBean, ApplicationEventPublisherAware
LeaderInitiator.| Constructor and Description |
|---|
LeaderInitiatorFactoryBean() |
LeaderInitiatorFactoryBean(org.apache.curator.framework.CuratorFramework client,
String path,
String role)
Deprecated.
since 4.2.5 in favor of appropriate setters
to avoid
BeanCurrentlyInCreationException
during AbstractAutowireCapableBeanFactory.getSingletonFactoryBeanForTypeCheck() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
LeaderInitiator |
getObject() |
Class<?> |
getObjectType() |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
boolean |
isSingleton() |
void |
setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) |
void |
setAutoStartup(boolean autoStartup) |
LeaderInitiatorFactoryBean |
setClient(org.apache.curator.framework.CuratorFramework client) |
void |
setLeaderEventPublisher(LeaderEventPublisher leaderEventPublisher)
A
LeaderEventPublisher option for events from the LeaderInitiator. |
LeaderInitiatorFactoryBean |
setPath(String path) |
void |
setPhase(int phase) |
LeaderInitiatorFactoryBean |
setRole(String role) |
void |
start() |
void |
stop() |
void |
stop(Runnable callback) |
public LeaderInitiatorFactoryBean()
@Deprecated public LeaderInitiatorFactoryBean(org.apache.curator.framework.CuratorFramework client, String path, String role)
BeanCurrentlyInCreationException
during AbstractAutowireCapableBeanFactory.getSingletonFactoryBeanForTypeCheck()client - the CuratorFramework.path - the path in zookeeper.role - the role of the leader.public LeaderInitiatorFactoryBean setClient(org.apache.curator.framework.CuratorFramework client)
public LeaderInitiatorFactoryBean setPath(String path)
public LeaderInitiatorFactoryBean setRole(String role)
public void setLeaderEventPublisher(LeaderEventPublisher leaderEventPublisher)
LeaderEventPublisher option for events from the LeaderInitiator.leaderEventPublisher - the LeaderEventPublisher to use.public void setPhase(int phase)
public void setAutoStartup(boolean autoStartup)
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher in interface ApplicationEventPublisherAwarepublic boolean isAutoStartup()
isAutoStartup in interface SmartLifecyclepublic void stop(Runnable callback)
stop in interface SmartLifecyclepublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic LeaderInitiator getObject() throws Exception
getObject in interface FactoryBean<LeaderInitiator>Exceptionpublic Class<?> getObjectType()
getObjectType in interface FactoryBean<LeaderInitiator>public boolean isSingleton()
isSingleton in interface FactoryBean<LeaderInitiator>