类 HealthCheckCommonV2
- java.lang.Object
-
- com.alibaba.nacos.naming.healthcheck.v2.processor.HealthCheckCommonV2
-
@Component public class HealthCheckCommonV2 extends java.lang.ObjectHealth 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
-
-
字段概要
字段 修饰符和类型 字段 说明 private DistroMapperdistroMapperprivate PersistentHealthStatusSynchronizerhealthStatusSynchronizerprivate SwitchDomainswitchDomain
-
构造器概要
构造器 构造器 说明 HealthCheckCommonV2()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidcheckFail(HealthCheckTaskV2 task, Service service, java.lang.String msg)Health check fail, when instance check failed count more than max failed time, set unhealthy.voidcheckFailNow(HealthCheckTaskV2 task, Service service, java.lang.String msg)Health check fail, set instance unhealthy directly.voidcheckOk(HealthCheckTaskV2 task, Service service, java.lang.String msg)Health check pass.voidreEvaluateCheckRT(long checkRT, HealthCheckTaskV2 task, SwitchDomain.HealthParams params)Re-evaluate check response time.
-
-
-
字段详细资料
-
distroMapper
@Autowired private DistroMapper distroMapper
-
switchDomain
@Autowired private SwitchDomain switchDomain
-
healthStatusSynchronizer
@Autowired private PersistentHealthStatusSynchronizer healthStatusSynchronizer
-
-
方法详细资料
-
reEvaluateCheckRT
public void reEvaluateCheckRT(long checkRT, HealthCheckTaskV2 task, SwitchDomain.HealthParams params)Re-evaluate check response time.- 参数:
checkRT- check response timetask- health check taskparams- health params
-
checkOk
public void checkOk(HealthCheckTaskV2 task, Service service, java.lang.String msg)
Health check pass.- 参数:
task- health check taskservice- servicemsg- 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 taskservice- servicemsg- message
-
checkFailNow
public void checkFailNow(HealthCheckTaskV2 task, Service service, java.lang.String msg)
Health check fail, set instance unhealthy directly.- 参数:
task- health check taskservice- servicemsg- message
-
-