Table of Contents

Class HystrixCommand

Namespace
Steeltoe.CircuitBreaker.Hystrix
Assembly
Steeltoe.CircuitBreaker.HystrixBase.dll
public class HystrixCommand : HystrixCommand<Unit>, IHystrixInvokableInfo, IHystrixExecutable<Unit>, IHystrixObservable<Unit>, IHystrixExecutable, IHystrixObservable, IHystrixInvokable
Inheritance
HystrixCommand
Implements
Inherited Members

Constructors

HystrixCommand(IHystrixCommandGroupKey, IHystrixCommandKey, IHystrixThreadPoolKey, IHystrixCircuitBreaker, IHystrixThreadPool, IHystrixCommandOptions, IHystrixThreadPoolOptions, HystrixCommandMetrics, SemaphoreSlim, SemaphoreSlim, HystrixOptionsStrategy, HystrixCommandExecutionHook, Action, Action, ILogger)

public HystrixCommand(IHystrixCommandGroupKey group, IHystrixCommandKey key, IHystrixThreadPoolKey threadPoolKey, IHystrixCircuitBreaker circuitBreaker, IHystrixThreadPool threadPool, IHystrixCommandOptions commandOptionsDefaults, IHystrixThreadPoolOptions threadPoolOptionsDefaults, HystrixCommandMetrics metrics, SemaphoreSlim fallbackSemaphore, SemaphoreSlim executionSemaphore, HystrixOptionsStrategy optionsStrategy, HystrixCommandExecutionHook executionHook, Action run, Action fallback, ILogger logger = null)

Parameters

group IHystrixCommandGroupKey
key IHystrixCommandKey
threadPoolKey IHystrixThreadPoolKey
circuitBreaker IHystrixCircuitBreaker
threadPool IHystrixThreadPool
commandOptionsDefaults IHystrixCommandOptions
threadPoolOptionsDefaults IHystrixThreadPoolOptions
metrics HystrixCommandMetrics
fallbackSemaphore SemaphoreSlim
executionSemaphore SemaphoreSlim
optionsStrategy HystrixOptionsStrategy
executionHook HystrixCommandExecutionHook
run Action
fallback Action
logger ILogger

HystrixCommand(IHystrixCommandGroupKey, IHystrixThreadPoolKey, Action, Action, ILogger)

public HystrixCommand(IHystrixCommandGroupKey group, IHystrixThreadPoolKey threadPool, Action run = null, Action fallback = null, ILogger logger = null)

Parameters

group IHystrixCommandGroupKey
threadPool IHystrixThreadPoolKey
run Action
fallback Action
logger ILogger

HystrixCommand(IHystrixCommandGroupKey, IHystrixThreadPoolKey, int, Action, Action, ILogger)

public HystrixCommand(IHystrixCommandGroupKey group, IHystrixThreadPoolKey threadPool, int executionIsolationThreadTimeoutInMilliseconds, Action run = null, Action fallback = null, ILogger logger = null)

Parameters

group IHystrixCommandGroupKey
threadPool IHystrixThreadPoolKey
executionIsolationThreadTimeoutInMilliseconds int
run Action
fallback Action
logger ILogger

HystrixCommand(IHystrixCommandGroupKey, Action, Action, ILogger)

public HystrixCommand(IHystrixCommandGroupKey group, Action run = null, Action fallback = null, ILogger logger = null)

Parameters

group IHystrixCommandGroupKey
run Action
fallback Action
logger ILogger

HystrixCommand(IHystrixCommandGroupKey, int, Action, Action, ILogger)

public HystrixCommand(IHystrixCommandGroupKey group, int executionIsolationThreadTimeoutInMilliseconds, Action run = null, Action fallback = null, ILogger logger = null)

Parameters

group IHystrixCommandGroupKey
executionIsolationThreadTimeoutInMilliseconds int
run Action
fallback Action
logger ILogger

HystrixCommand(IHystrixCommandOptions, Action, Action, ILogger)

public HystrixCommand(IHystrixCommandOptions commandOptions, Action run = null, Action fallback = null, ILogger logger = null)

Parameters

commandOptions IHystrixCommandOptions
run Action
fallback Action
logger ILogger

Fields

_fallback

protected readonly Action _fallback

Field Value

Action

_run

protected readonly Action _run

Field Value

Action

Methods

DoFallback()

protected override Unit DoFallback()

Returns

Unit

DoRun()

protected override Unit DoRun()

Returns

Unit

Execute()

public void Execute()

ExecuteAsync()

public Task ExecuteAsync()

Returns

Task

ExecuteAsync(CancellationToken)

public Task ExecuteAsync(CancellationToken token)

Parameters

token CancellationToken

Returns

Task

Run()

protected virtual void Run()

RunFallback()

protected virtual void RunFallback()