• hystrix源码小贴士之Servo Publisher


    HystrixServoMetricsPublisher

      继承HystrixMetricsPublisher,创建HystrixServoMetricsPublisherCommand、HystrixServoMetricsPublisherThreadPool、HystrixServoMetricsPublisherCollapser。

        @Override
        public HystrixMetricsPublisherCommand getMetricsPublisherForCommand(HystrixCommandKey commandKey, HystrixCommandGroupKey commandGroupKey, HystrixCommandMetrics metrics, HystrixCircuitBreaker circuitBreaker, HystrixCommandProperties properties) {
            return new HystrixServoMetricsPublisherCommand(commandKey, commandGroupKey, metrics, circuitBreaker, properties);
        }
    
        @Override
        public HystrixMetricsPublisherThreadPool getMetricsPublisherForThreadPool(HystrixThreadPoolKey threadPoolKey, HystrixThreadPoolMetrics metrics, HystrixThreadPoolProperties properties) {
            return new HystrixServoMetricsPublisherThreadPool(threadPoolKey, metrics, properties);
        }
    
        @Override
        public HystrixMetricsPublisherCollapser getMetricsPublisherForCollapser(HystrixCollapserKey collapserKey, HystrixCollapserMetrics metrics, HystrixCollapserProperties properties) {
            return new HystrixServoMetricsPublisherCollapser(collapserKey, metrics, properties);
        }

    HystrixServoMetricsPublisherCommand

      从HystrixCommandMetrics获取数据,然后设置到DefaultMonitorRegistry中。

    HystrixServoMetricsPublisherThreadPool

       从HystrixThreadPoolMetrics获取数据,然后设置到DefaultMonitorRegistry中。

    HystrixServoMetricsPublisherCollapser

      从HystrixCollapserMetrics获取数据,然后设置到DefaultMonitorRegistry中。 

  • 相关阅读:
    转:高并发场景下强一致预算/库存扣减方案
    转:Dubbo性能调优参数及原理
    转:java线程状态说明,Jstack线程状态BLOCKED/TIMED_WAITING/WAITING解释
    使用增强学习法之SQ3R主动阅读
    建立实用投资计划
    使用smarty方法实现目标
    主动学习
    小知识
    大脑的处理模式
    真正的随笔
  • 原文地址:https://www.cnblogs.com/zhangwanhua/p/8192215.html
Copyright © 2020-2023  润新知