Class NacosDiscoveryHeartBeatPublisher
java.lang.Object
com.alibaba.cloud.nacos.discovery.NacosDiscoveryHeartBeatPublisher
- 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 NacosDiscoveryHeartBeatPublisher
extends Object
implements org.springframework.context.ApplicationEventPublisherAware, org.springframework.context.SmartLifecycle
- Author:
- yuhuangbin, ruansheng
-
Field Summary
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionNacosDiscoveryHeartBeatPublisher(NacosDiscoveryProperties nacosDiscoveryProperties) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanvoidnacos doesn't support watch now , publish an event every 30 seconds.voidsetApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) voidstart()voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecycle
getPhase, stop
-
Constructor Details
-
NacosDiscoveryHeartBeatPublisher
-
-
Method Details
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
isAutoStartup
public boolean isAutoStartup()- Specified by:
isAutoStartupin interfaceorg.springframework.context.SmartLifecycle
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
setApplicationEventPublisher
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher) - Specified by:
setApplicationEventPublisherin interfaceorg.springframework.context.ApplicationEventPublisherAware
-
publishHeartBeat
public void publishHeartBeat()nacos doesn't support watch now , publish an event every 30 seconds.
-