public class LeaderInitiatorFactoryBean extends java.lang.Object implements org.springframework.beans.factory.FactoryBean<LeaderInitiator>, org.springframework.context.SmartLifecycle, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationEventPublisherAware
LeaderInitiator.| Constructor and Description |
|---|
LeaderInitiatorFactoryBean() |
LeaderInitiatorFactoryBean(org.apache.curator.framework.CuratorFramework client,
java.lang.String path,
java.lang.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() |
java.lang.Class<?> |
getObjectType() |
int |
getPhase() |
boolean |
isAutoStartup() |
boolean |
isRunning() |
boolean |
isSingleton() |
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) |
void |
setAutoStartup(boolean autoStartup) |
LeaderInitiatorFactoryBean |
setClient(org.apache.curator.framework.CuratorFramework client) |
LeaderInitiatorFactoryBean |
setPath(java.lang.String path) |
void |
setPhase(int phase) |
LeaderInitiatorFactoryBean |
setRole(java.lang.String role) |
void |
start() |
void |
stop() |
void |
stop(java.lang.Runnable callback) |
public LeaderInitiatorFactoryBean()
@Deprecated
public LeaderInitiatorFactoryBean(org.apache.curator.framework.CuratorFramework client,
java.lang.String path,
java.lang.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(java.lang.String path)
public LeaderInitiatorFactoryBean setRole(java.lang.String role)
public void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic int getPhase()
getPhase in interface org.springframework.context.Phasedpublic void setPhase(int phase)
public boolean isAutoStartup()
isAutoStartup in interface org.springframework.context.SmartLifecyclepublic void setAutoStartup(boolean autoStartup)
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAwarepublic void stop(java.lang.Runnable callback)
stop in interface org.springframework.context.SmartLifecyclepublic void afterPropertiesSet()
throws java.lang.Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanjava.lang.Exceptionpublic LeaderInitiator getObject() throws java.lang.Exception
getObject in interface org.springframework.beans.factory.FactoryBean<LeaderInitiator>java.lang.Exceptionpublic java.lang.Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<LeaderInitiator>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<LeaderInitiator>