C# Класс Hudl.Mjolnir.Breaker.FailurePercentageCircuitBreaker

Trips when the error percentage rises above a configured threshold percentage. This breaker is modeled after Hystrix's HystrixCircuitBreakerImpl. However, the metrics implementations that drive the breaker are fairly different.
Наследование: ICircuitBreaker
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AllowSingleTest bool
CheckAndSetTripped bool
FailurePercentageCircuitBreaker System
FailurePercentageCircuitBreaker System
IsPastWaitDuration bool

Открытые методы

Метод Описание
IsAllowing ( ) : bool

MarkSuccess ( long elapsedMillis ) : void

Indicates that a recently-completed operation was successful. If the breaker is tripped and MarkSuccess() is called, the breaker will be fixed. The operation's elapsed duration (in milliseconds) is used to ensure the operation being checked began before the breaker was initially tripped.

Приватные методы

Метод Описание
AllowSingleTest ( ) : bool

CheckAndSetTripped ( ) : bool

Checks to see if the breaker should trip, and trips if it should.

FailurePercentageCircuitBreaker ( Hudl.Mjolnir.Key.GroupKey key, IClock clock, ICommandMetrics metrics, IStats stats, IMetricEvents metricEvents, FailurePercentageCircuitBreakerProperties properties, IConfigurableValue gaugeIntervalMillisOverride = null ) : System
FailurePercentageCircuitBreaker ( Hudl.Mjolnir.Key.GroupKey key, ICommandMetrics metrics, IStats stats, IMetricEvents metricEvents, FailurePercentageCircuitBreakerProperties properties ) : System
IsPastWaitDuration ( ) : bool

Описание методов

IsAllowing() публичный Метод

public IsAllowing ( ) : bool
Результат bool

MarkSuccess() публичный Метод

Indicates that a recently-completed operation was successful. If the breaker is tripped and MarkSuccess() is called, the breaker will be fixed. The operation's elapsed duration (in milliseconds) is used to ensure the operation being checked began before the breaker was initially tripped.
public MarkSuccess ( long elapsedMillis ) : void
elapsedMillis long
Результат void