类 HealthCheckCommonV2


  • @Component
    public class HealthCheckCommonV2
    extends java.lang.Object
    Health check public methods for v2.x.

    Current health check logic is same as v1.x. TODO refactor health check for v2.x.

    从以下版本开始:
    2.0.0
    作者:
    nkorange, xiweng.yy
    • 构造器详细资料

      • HealthCheckCommonV2

        public HealthCheckCommonV2()
    • 方法详细资料

      • reEvaluateCheckRT

        public void reEvaluateCheckRT​(long checkRT,
                                      HealthCheckTaskV2 task,
                                      SwitchDomain.HealthParams params)
        Re-evaluate check response time.
        参数:
        checkRT - check response time
        task - health check task
        params - health params
      • checkOk

        public void checkOk​(HealthCheckTaskV2 task,
                            Service service,
                            java.lang.String msg)
        Health check pass.
        参数:
        task - health check task
        service - service
        msg - message
      • checkFail

        public void checkFail​(HealthCheckTaskV2 task,
                              Service service,
                              java.lang.String msg)
        Health check fail, when instance check failed count more than max failed time, set unhealthy.
        参数:
        task - health check task
        service - service
        msg - message
      • checkFailNow

        public void checkFailNow​(HealthCheckTaskV2 task,
                                 Service service,
                                 java.lang.String msg)
        Health check fail, set instance unhealthy directly.
        参数:
        task - health check task
        service - service
        msg - message