Eureka Server 代码分析01

Eureka Server 配置

InstanceStatus: 实例状态
    public enum InstanceStatus {
        UP, // Ready to receive traffic 准备接收通信(流量)
        DOWN, // Do not send traffic- healthcheck callback failed 不发送流量,服务健康检查调用失败
        STARTING, // Just about starting- initializations to be done - do not
        // send traffic
        OUT_OF_SERVICE, // Intentionally shutdown for traffic 故意关闭流量
        UNKNOWN;

        public static InstanceStatus toEnum(String s) {
            if (s != null) {
                try {
                    return InstanceStatus.valueOf(s.toUpperCase());
                } catch (IllegalArgumentException e) {
                    // ignore and fall through to unknown
                    logger.debug("illegal argument supplied to InstanceStatus.valueOf: {}, defaulting to {}", s, UNKNOWN);
                }
            }
            return UNKNOWN;
        }
    }

猜你喜欢

转载自www.cnblogs.com/zhujunhuawoaini/p/11073774.html
今日推荐