Class EtcdPublisher
java.lang.Object
com.predic8.membrane.core.cloud.etcd.EtcdPublisher
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.Lifecycle
public class EtcdPublisher
extends Object
implements org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetTtl()booleanbooleanvoidvoidsetApplicationContext(org.springframework.context.ApplicationContext arg0) voidsetBaseKey(String baseKey) voidsetBaseUrl(String baseURL) voidsetTtl(int ttl) voidstart()voidstop()
-
Constructor Details
-
EtcdPublisher
public EtcdPublisher()
-
-
Method Details
-
getBaseUrl
-
setBaseUrl
- Default
- "..."
- Description
- URL for etcd
-
getBaseKey
-
setBaseKey
- Default
- "/asa/lb"
- Description
- Key/Directory
-
getTtl
public int getTtl() -
setTtl
public void setTtl(int ttl) - Default
- 300
- Description
- time to live of etcd data
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
readConfig
public void readConfig() -
publishToEtcd
public boolean publishToEtcd() -
start
@EventListener(org.springframework.context.event.ContextRefreshedEvent.class) public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext arg0) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-