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
  • Constructor Details

    • NacosDiscoveryHeartBeatPublisher

      public NacosDiscoveryHeartBeatPublisher(NacosDiscoveryProperties nacosDiscoveryProperties)
  • Method Details

    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • isAutoStartup

      public boolean isAutoStartup()
      Specified by:
      isAutoStartup in interface org.springframework.context.SmartLifecycle
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • setApplicationEventPublisher

      public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher applicationEventPublisher)
      Specified by:
      setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAware
    • publishHeartBeat

      public void publishHeartBeat()
      nacos doesn't support watch now , publish an event every 30 seconds.