C# Class Hudl.Mjolnir.Command.CommandContextImpl

Manages all of Mjolnir's bulkheads, breakers, and other state. Also handles dependency injection for replaceable components (stats, config, etc.). Client code typically doesn't interact with CommandContext other than to inject dependencies.
Inheritance: ICommandContext
Mostrar archivo Open project: hudl/Mjolnir Class Usage Examples

Public Methods

Method Description
GetBulkhead ( Hudl.Mjolnir.Key.GroupKey key ) : IBulkheadSemaphore

Callers should keep a local reference to the bulkhead object they receive from this method, ensuring that they call TryEnter and Release on the same object reference. Phrased differently: don't re-retrieve the bulkhead before calling Release().

GetCircuitBreaker ( Hudl.Mjolnir.Key.GroupKey key ) : ICircuitBreaker
GetFallbackSemaphore ( Hudl.Mjolnir.Key.GroupKey key ) : IIsolationSemaphore
GetThreadPool ( Hudl.Mjolnir.Key.GroupKey key ) : IIsolationThreadPool
IgnoreExceptions ( HashSet types ) : void
IsExceptionIgnored ( Type type ) : bool

Private Methods

Method Description
GetCommandMetrics ( Hudl.Mjolnir.Key.GroupKey key ) : ICommandMetrics

Method Details

GetBulkhead() public method

Callers should keep a local reference to the bulkhead object they receive from this method, ensuring that they call TryEnter and Release on the same object reference. Phrased differently: don't re-retrieve the bulkhead before calling Release().
public GetBulkhead ( Hudl.Mjolnir.Key.GroupKey key ) : IBulkheadSemaphore
key Hudl.Mjolnir.Key.GroupKey
return IBulkheadSemaphore

GetCircuitBreaker() public method

public GetCircuitBreaker ( Hudl.Mjolnir.Key.GroupKey key ) : ICircuitBreaker
key Hudl.Mjolnir.Key.GroupKey
return ICircuitBreaker

GetFallbackSemaphore() public method

public GetFallbackSemaphore ( Hudl.Mjolnir.Key.GroupKey key ) : IIsolationSemaphore
key Hudl.Mjolnir.Key.GroupKey
return IIsolationSemaphore

GetThreadPool() public method

public GetThreadPool ( Hudl.Mjolnir.Key.GroupKey key ) : IIsolationThreadPool
key Hudl.Mjolnir.Key.GroupKey
return IIsolationThreadPool

IgnoreExceptions() public method

public IgnoreExceptions ( HashSet types ) : void
types HashSet
return void

IsExceptionIgnored() public method

public IsExceptionIgnored ( Type type ) : bool
type Type
return bool