类 BeatReactor

  • 所有已实现的接口:
    com.alibaba.nacos.common.lifecycle.Closeable

    public class BeatReactor
    extends java.lang.Object
    implements com.alibaba.nacos.common.lifecycle.Closeable
    Beat reactor.
    作者:
    harold
    • 字段详细资料

      • CLIENT_BEAT_INTERVAL_FIELD

        private static final java.lang.String CLIENT_BEAT_INTERVAL_FIELD
        另请参阅:
        常量字段值
      • executorService

        private final java.util.concurrent.ScheduledExecutorService executorService
      • lightBeatEnabled

        private boolean lightBeatEnabled
      • dom2Beat

        public final java.util.Map<java.lang.String,​BeatInfo> dom2Beat
    • 方法详细资料

      • initClientBeatThreadCount

        private int initClientBeatThreadCount​(java.util.Properties properties)
      • addBeatInfo

        public void addBeatInfo​(java.lang.String serviceName,
                                BeatInfo beatInfo)
        Add beat information.
        参数:
        serviceName - service name
        beatInfo - beat information
      • removeBeatInfo

        public void removeBeatInfo​(java.lang.String serviceName,
                                   java.lang.String ip,
                                   int port)
        Remove beat information.
        参数:
        serviceName - service name
        ip - ip of beat information
        port - port of beat information
      • buildBeatInfo

        public BeatInfo buildBeatInfo​(com.alibaba.nacos.api.naming.pojo.Instance instance)
        Build new beat information.
        参数:
        instance - instance
        返回:
        new beat information
      • buildBeatInfo

        public BeatInfo buildBeatInfo​(java.lang.String groupedServiceName,
                                      com.alibaba.nacos.api.naming.pojo.Instance instance)
        Build new beat information.
        参数:
        groupedServiceName - service name with group name, format: ${groupName}@@${serviceName}
        instance - instance
        返回:
        new beat information
      • buildKey

        public java.lang.String buildKey​(java.lang.String serviceName,
                                         java.lang.String ip,
                                         int port)
      • shutdown

        public void shutdown()
                      throws com.alibaba.nacos.api.exception.NacosException
        指定者:
        shutdown 在接口中 com.alibaba.nacos.common.lifecycle.Closeable
        抛出:
        com.alibaba.nacos.api.exception.NacosException