类 NacosContextRefresher
java.lang.Object
com.alibaba.cloud.nacos.refresh.NacosContextRefresher
- 所有已实现的接口:
EventListener,org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>
public class NacosContextRefresher
extends Object
implements org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>, org.springframework.context.ApplicationContextAware
On application start up, NacosContextRefresher add nacos listeners to all application
level dataIds, when there is a change in the data, listeners will refresh
configurations.
- 作者:
- juven.xuxb, pbting, freeman
-
构造器概要
构造器构造器说明NacosContextRefresher(NacosConfigManager nacosConfigManager, NacosRefreshHistory refreshHistory) -
方法概要
修饰符和类型方法说明static longbooleanvoidonApplicationEvent(org.springframework.boot.context.event.ApplicationReadyEvent event) static voidvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) setNacosConfigProperties(NacosConfigProperties nacosConfigProperties) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.springframework.context.ApplicationListener
supportsAsyncExecution
-
构造器详细资料
-
NacosContextRefresher
public NacosContextRefresher(NacosConfigManager nacosConfigManager, NacosRefreshHistory refreshHistory)
-
-
方法详细资料
-
getRefreshCount
public static long getRefreshCount() -
refreshCountIncrement
public static void refreshCountIncrement() -
onApplicationEvent
public void onApplicationEvent(org.springframework.boot.context.event.ApplicationReadyEvent event) - 指定者:
onApplicationEvent在接口中org.springframework.context.ApplicationListener<org.springframework.boot.context.event.ApplicationReadyEvent>
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) - 指定者:
setApplicationContext在接口中org.springframework.context.ApplicationContextAware
-
getNacosConfigProperties
-
setNacosConfigProperties
-
isRefreshEnabled
public boolean isRefreshEnabled()
-