zoukankan      html  css  js  c++  java
  • 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中。 

  • 相关阅读:
    判断变量是否是数组
    手机闹钟功能: 使用状态图解决闹钟响铃问题
    logging基本使用方法
    ssh 通过跳板机连接到远程服务器
    ssh 执行命令并实时显示结果
    使用 python 将 " " 转换为 " "
    python 文件操作
    python SMTP 发送邮件
    C++统一初始化
    设计模式之单例模式实现(C++)
  • 原文地址:https://www.cnblogs.com/zhangwanhua/p/8192215.html
Copyright © 2011-2022 走看看