Class ConfigWatch
- java.lang.Object
-
- org.springframework.cloud.consul.config.ConfigWatch
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationEventPublisherAware,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
public class ConfigWatch extends Object implements org.springframework.context.ApplicationEventPublisherAware, org.springframework.context.SmartLifecycle
- Author:
- Spencer Gibb
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConfigWatch.RefreshEventData
-
Constructor Summary
Constructors Constructor Description ConfigWatch(ConsulConfigProperties properties, com.ecwid.consul.v1.ConsulClient consul, LinkedHashMap<String,Long> initialIndexes)ConfigWatch(ConsulConfigProperties properties, com.ecwid.consul.v1.ConsulClient consul, LinkedHashMap<String,Long> initialIndexes, org.springframework.scheduling.TaskScheduler taskScheduler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPhase()booleanisAutoStartup()booleanisRunning()voidsetApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher)voidstart()voidstop()voidstop(Runnable callback)voidwatchConfigKeyValues()
-
-
-
Constructor Detail
-
ConfigWatch
public ConfigWatch(ConsulConfigProperties properties, com.ecwid.consul.v1.ConsulClient consul, LinkedHashMap<String,Long> initialIndexes)
-
ConfigWatch
public ConfigWatch(ConsulConfigProperties properties, com.ecwid.consul.v1.ConsulClient consul, LinkedHashMap<String,Long> initialIndexes, org.springframework.scheduling.TaskScheduler taskScheduler)
-
-
Method Detail
-
setApplicationEventPublisher
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher)
- Specified by:
setApplicationEventPublisherin interfaceorg.springframework.context.ApplicationEventPublisherAware
-
start
public void start()
- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
isAutoStartup
public boolean isAutoStartup()
- Specified by:
isAutoStartupin interfaceorg.springframework.context.SmartLifecycle
-
stop
public void stop(Runnable callback)
- Specified by:
stopin interfaceorg.springframework.context.SmartLifecycle
-
getPhase
public int getPhase()
- Specified by:
getPhasein interfaceorg.springframework.context.Phased- Specified by:
getPhasein interfaceorg.springframework.context.SmartLifecycle
-
stop
public void stop()
- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
isRunning
public boolean isRunning()
- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
watchConfigKeyValues
public void watchConfigKeyValues()
-
-