public HystrixCollapserConfiguration(IHystrixCollapserKey collapserKey, int maxRequestsInBatch, int timerDelayInMilliseconds, bool requestCacheEnabled, CollapserMetricsConfig collapserMetricsConfig) { this.collapserKey = collapserKey; this.maxRequestsInBatch = maxRequestsInBatch; this.timerDelayInMilliseconds = timerDelayInMilliseconds; this.requestCacheEnabled = requestCacheEnabled; this.collapserMetricsConfig = collapserMetricsConfig; }
public static HystrixCollapserConfiguration Sample(IHystrixCollapserKey collapserKey, IHystrixCollapserOptions collapserProperties) { CollapserMetricsConfig collapserMetricsConfig = new CollapserMetricsConfig( collapserProperties.MetricsRollingPercentileWindowBuckets, collapserProperties.MetricsRollingPercentileWindowInMilliseconds, collapserProperties.MetricsRollingPercentileEnabled, collapserProperties.MetricsRollingStatisticalWindowBuckets, collapserProperties.MetricsRollingStatisticalWindowInMilliseconds); return(new HystrixCollapserConfiguration( collapserKey, collapserProperties.MaxRequestsInBatch, collapserProperties.TimerDelayInMilliseconds, collapserProperties.RequestCacheEnabled, collapserMetricsConfig)); }