Java Code Examples for com.netflix.hystrix.HystrixCollapserProperties

Following code examples demonstrate how to use com.netflix.hystrix.HystrixCollapserProperties 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.HystrixCollapserProperties and various code implementation of this class.
Example 1
Project : netflix-hystrix Source File : RollingCollapserEventCounterStream.java View Source Code on GitHub

    public static RollingCollapserEventCounterStream getInstance(HystrixCollapserKey collapserKey, HystrixCollapserProperties properties) {
        final int counterMetricWindow = properties.metricsRollingStatisticalWindowInMilliseconds().get();
        final int numCounterBuckets = properties.metricsRollingStatisticalWindowBuckets().get();
        final int counterBucketSizeInMs = counterMetricWindow / numCounterBuckets;

        return getInstance(collapserKey, numCounterBuckets, counterBucketSizeInMs);
    }
			
Example 2
Project : netflix-hystrix Source File : CumulativeCollapserEventCounterStream.java View Source Code on GitHub

    public static CumulativeCollapserEventCounterStream getInstance(HystrixCollapserKey collapserKey, HystrixCollapserProperties properties) {
        final int counterMetricWindow = properties.metricsRollingStatisticalWindowInMilliseconds().get();
        final int numCounterBuckets = properties.metricsRollingStatisticalWindowBuckets().get();
        final int counterBucketSizeInMs = counterMetricWindow / numCounterBuckets;

        return getInstance(collapserKey, numCounterBuckets, counterBucketSizeInMs);
    }