Java Code Examples for com.netflix.hystrix.metric.consumer.CumulativeThreadPoolEventCounterStream

Following code examples demonstrate how to use com.netflix.hystrix.metric.consumer.CumulativeThreadPoolEventCounterStream from netflix-hystrix. These examples are extracted from various highly rated open source projects. You can directly use these code snippets or view their entire linked source code. These snippets are extracted to provide contextual information about how to use this class in the real world. These samples also let you understand some good practices on how to use com.netflix.hystrix.metric.consumer.CumulativeThreadPoolEventCounterStream and various code implementation of this class.
Example 1
Project : netflix-hystrix Source File : HystrixFluxMetricsPublisherThreadPool.java View Source Code on GitHub

    public void initialize() {
        
        List<Monitor<?>> monitors = getMonitors();

        MonitorConfig commandMetricsConfig = MonitorConfig.builder("HystrixThreadPool_" + key.name()).build();
        BasicCompositeMonitor commandMetricsMonitor = new BasicCompositeMonitor(commandMetricsConfig, monitors);

        DefaultMonitorRegistry.getInstance().register(commandMetricsMonitor);
        RollingThreadPoolEventCounterStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
        CumulativeThreadPoolEventCounterStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
        RollingThreadPoolMaxConcurrencyStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
    }
			
Example 2
Project : netflix-hystrix Source File : HystrixServoMetricsPublisherThreadPool.java View Source Code on GitHub

    public void initialize() {
        
        List<Monitor<?>> monitors = getServoMonitors();

        MonitorConfig commandMetricsConfig = MonitorConfig.builder("HystrixThreadPool_" + key.name()).build();
        BasicCompositeMonitor commandMetricsMonitor = new BasicCompositeMonitor(commandMetricsConfig, monitors);

        DefaultMonitorRegistry.getInstance().register(commandMetricsMonitor);
        RollingThreadPoolEventCounterStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
        CumulativeThreadPoolEventCounterStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
        RollingThreadPoolMaxConcurrencyStream.getInstance(key, properties).startCachingStreamValuesIfUnstarted();
    }