C# Class Hudl.Mjolnir.Command.BaseCommand

An operation that needs isolation during failure. When passed to an Invoke method on the CommandInvoker, the operation implemented in the Execute method receives protection via timeouts, circuit breakers, and bulkheads. For a detailed overview, see https://github.com/hudl/Mjolnir/wiki.
Inheritance: Command
Datei anzeigen Open project: hudl/Mjolnir

Private Properties

Property Type Description
BaseCommand Hudl.Config
CacheProvidedName string
DetermineTimeout System.TimeSpan
GenerateAndCacheName string
GetTimeoutConfigurableValue IConfigurableValue

Protected Methods

Method Description
BaseCommand ( string group, string breakerKey, string bulkheadKey, System.TimeSpan defaultTimeout ) : Hudl.Config

Constructs the command. The group is used as part of the command's Name. If the group contains dots, they'll be converted to dashes. Command timeouts can be configured at runtime. Configuration keys follow the form: mjolnir.command.[Command.Name].Timeout). If not configured, the provided defaultTimeout will be used. If no defaultTimeout is provided, a Mjolnir-wide timeout of 2 seconds will be applied.

Private Methods

Method Description
BaseCommand ( string group, string name, string breakerKey, string bulkheadKey, System.TimeSpan defaultTimeout = null ) : Hudl.Config
CacheProvidedName ( Hudl.Mjolnir.Key.GroupKey group, string name ) : string
DetermineTimeout ( long invocationTimeoutMillis = null ) : System.TimeSpan
GenerateAndCacheName ( Hudl.Mjolnir.Key.GroupKey group ) : string
GetTimeoutConfigurableValue ( string commandName ) : IConfigurableValue

Method Details

BaseCommand() protected method

Constructs the command. The group is used as part of the command's Name. If the group contains dots, they'll be converted to dashes. Command timeouts can be configured at runtime. Configuration keys follow the form: mjolnir.command.[Command.Name].Timeout). If not configured, the provided defaultTimeout will be used. If no defaultTimeout is provided, a Mjolnir-wide timeout of 2 seconds will be applied.
protected BaseCommand ( string group, string breakerKey, string bulkheadKey, System.TimeSpan defaultTimeout ) : Hudl.Config
group string Logical grouping for the command, usually the owning team. Avoid using dots.
breakerKey string Breaker to use for this command.
bulkheadKey string Bulkhead to use for this command.
defaultTimeout System.TimeSpan Timeout to enforce if not otherwise provided.
return Hudl.Config