public RequestCacheKey(IHystrixCollapserKey collapserKey, IHystrixConcurrencyStrategy concurrencyStrategy) { type = 2; if (collapserKey == null) { this.key = null; } else { this.key = collapserKey.Name; } this.concurrencyStrategy = concurrencyStrategy; }
public static IHystrixCollapserProperties GetCollapserProperties(IHystrixCollapserKey collapserKey, HystrixCollapserPropertiesSetter setter) { if (collapserKey == null) throw new ArgumentNullException("collapserKey"); IHystrixPropertiesStrategy strategy = HystrixPlugins.Instance.PropertiesStrategy; string cacheKey = strategy.GetCollapserPropertiesCacheKey(collapserKey, setter); if (String.IsNullOrEmpty(cacheKey)) { return strategy.GetCollapserProperties(collapserKey, setter); } else { return collapserProperties.GetOrAdd(cacheKey, w => { if (setter == null) { setter = new HystrixCollapserPropertiesSetter(); } return strategy.GetCollapserProperties(collapserKey, setter); }); } }
public IHystrixCollapserProperties GetCollapserProperties(IHystrixCollapserKey collapserKey, HystrixCollapserPropertiesSetter setter) { throw new InvalidOperationException(); }
public static HystrixCollapserMetrics GetInstance(IHystrixCollapserKey key, IHystrixCollapserOptions properties) { return(metrics.GetOrAddEx(key.Name, (k) => new HystrixCollapserMetrics(key, properties))); }
public virtual IHystrixMetricsPublisherCollapser GetMetricsPublisherForCollapser(IHystrixCollapserKey collapserKey, HystrixCollapserMetrics metrics, IHystrixCollapserOptions properties) { return(new HystrixMetricsPublisherCollapserDefault(collapserKey, metrics, properties)); }
private ExecutionSignature(IHystrixCommandKey commandKey, ExecutionResult.EventCounts eventCounts, string cacheKey, int cachedCount, IHystrixCollapserKey collapserKey, int collapserBatchSize) { this.commandName = commandKey.Name; this.eventCounts = eventCounts; this.cacheKey = cacheKey; this.cachedCount = cachedCount; this.collapserKey = collapserKey; this.collapserBatchSize = collapserBatchSize; }
private CumulativeCollapserEventCounterStream(IHystrixCollapserKey collapserKey, int numCounterBuckets, int counterBucketSizeInMs, Func <long[], HystrixCollapserEvent, long[]> appendEventToBucket, Func <long[], long[], long[]> reduceBucket) : base(HystrixCollapserEventStream.GetInstance(collapserKey), numCounterBuckets, counterBucketSizeInMs, appendEventToBucket, reduceBucket) { }
public virtual IHystrixCollapserProperties GetCollapserProperties(IHystrixCollapserKey collapserKey, HystrixCollapserPropertiesSetter setter) { return new HystrixPropertiesCollapserDefault(setter); }
public static HystrixCollapserSetter WithCollapserKey(IHystrixCollapserKey collapserKey) { return new HystrixCollapserSetter(collapserKey); }
private RollingCollapserBatchSizeDistributionStream(IHystrixCollapserKey collapserKey, int numPercentileBuckets, int percentileBucketSizeInMs) : base(HystrixCollapserEventStream.GetInstance(collapserKey), numPercentileBuckets, percentileBucketSizeInMs, AddValuesToBucket) { }
public static RollingCollapserBatchSizeDistributionStream GetInstance(IHystrixCollapserKey collapserKey, int numBuckets, int bucketSizeInMs) { return(streams.GetOrAddEx(collapserKey.Name, (k) => new RollingCollapserBatchSizeDistributionStream(collapserKey, numBuckets, bucketSizeInMs))); }
public static HystrixCollapserEvent From(IHystrixCollapserKey collapserKey, CollapserEventType eventType, int count) { return(new HystrixCollapserEvent(collapserKey, eventType, count)); }
protected HystrixCollapserEvent(IHystrixCollapserKey collapserKey, CollapserEventType eventType, int count) { this.collapserKey = collapserKey; this.eventType = eventType; this.count = count; }
public static RollingCollapserEventCounterStream GetInstance(IHystrixCollapserKey collapserKey, int numBuckets, int bucketSizeInMs) { var result = Streams.GetOrAddEx(collapserKey.Name, (k) => new RollingCollapserEventCounterStream(collapserKey, numBuckets, bucketSizeInMs, HystrixCollapserMetrics.AppendEventToBucket, HystrixCollapserMetrics.BucketAggregator)); return(result); }
public string GetCollapserPropertiesCacheKey(IHystrixCollapserKey collapserKey, HystrixCollapserPropertiesSetter setter) { return null; }
private HystrixCollapserSetter(IHystrixCollapserKey collapserKey) { this.collapserKey = collapserKey; }
private static HystrixCollapserConfiguration SampleCollapserConfiguration(IHystrixCollapserKey collapserKey, IHystrixCollapserOptions collapserProperties) { return(HystrixCollapserConfiguration.Sample(collapserKey, collapserProperties)); }
public static Collapser From(ITestOutputHelper output, IHystrixCollapserKey key, int arg) { return(new Collapser(output, key, arg)); }
private Collapser(ITestOutputHelper output, IHystrixCollapserKey key, int arg) : base(Options(key, 100)) { this.arg = arg; this.output = output; }
public virtual string GetCollapserPropertiesCacheKey(IHystrixCollapserKey collapserKey, HystrixCollapserPropertiesSetter setter) { return collapserKey.Name; }
public static IHystrixMetricsPublisherCollapser CreateOrRetrievePublisherForCollapser(IHystrixCollapserKey collapserKey, HystrixCollapserMetrics metrics, IHystrixCollapserOptions properties) { return(singleton.GetPublisherForCollapser(collapserKey, metrics, properties)); }