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 -
Field Summary
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionConfigWatch(ConsulConfigProperties properties, org.springframework.cloud.consul.ConsulClient consul, LinkedHashMap<String, Long> initialIndexes) ConfigWatch(ConsulConfigProperties properties, org.springframework.cloud.consul.ConsulClient consul, LinkedHashMap<String, Long> initialIndexes, org.springframework.scheduling.TaskScheduler taskScheduler) -
Method Summary
Modifier and TypeMethodDescriptionintgetPhase()booleanbooleanvoidsetApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher) voidstart()voidstop()voidvoidMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecycle
isPauseable
-
Constructor Details
-
ConfigWatch
public ConfigWatch(ConsulConfigProperties properties, org.springframework.cloud.consul.ConsulClient consul, LinkedHashMap<String, Long> initialIndexes) -
ConfigWatch
public ConfigWatch(ConsulConfigProperties properties, org.springframework.cloud.consul.ConsulClient consul, LinkedHashMap<String, Long> initialIndexes, org.springframework.scheduling.TaskScheduler taskScheduler)
-
-
Method Details
-
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
- 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()
-