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
-
AbstractCommand<Unit>HystrixCommand<Unit>HystrixCommand
- Implements
-
IHystrixExecutable<Unit>IHystrixObservable<Unit>
- 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
IHystrixCommandGroupKeykey
IHystrixCommandKeythreadPoolKey
IHystrixThreadPoolKeycircuitBreaker
IHystrixCircuitBreakerthreadPool
IHystrixThreadPoolcommandOptionsDefaults
IHystrixCommandOptionsthreadPoolOptionsDefaults
IHystrixThreadPoolOptionsmetrics
HystrixCommandMetricsfallbackSemaphore
SemaphoreSlimexecutionSemaphore
SemaphoreSlimoptionsStrategy
HystrixOptionsStrategyexecutionHook
HystrixCommandExecutionHookrun
Actionfallback
Actionlogger
ILogger
HystrixCommand(IHystrixCommandGroupKey, IHystrixThreadPoolKey, Action, Action, ILogger)
public HystrixCommand(IHystrixCommandGroupKey group, IHystrixThreadPoolKey threadPool, Action run = null, Action fallback = null, ILogger logger = null)
Parameters
group
IHystrixCommandGroupKeythreadPool
IHystrixThreadPoolKeyrun
Actionfallback
Actionlogger
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
IHystrixCommandGroupKeythreadPool
IHystrixThreadPoolKeyexecutionIsolationThreadTimeoutInMilliseconds
intrun
Actionfallback
Actionlogger
ILogger
HystrixCommand(IHystrixCommandGroupKey, Action, Action, ILogger)
public HystrixCommand(IHystrixCommandGroupKey group, Action run = null, Action fallback = null, ILogger logger = null)
Parameters
group
IHystrixCommandGroupKeyrun
Actionfallback
Actionlogger
ILogger
HystrixCommand(IHystrixCommandGroupKey, int, Action, Action, ILogger)
public HystrixCommand(IHystrixCommandGroupKey group, int executionIsolationThreadTimeoutInMilliseconds, Action run = null, Action fallback = null, ILogger logger = null)
Parameters
group
IHystrixCommandGroupKeyexecutionIsolationThreadTimeoutInMilliseconds
intrun
Actionfallback
Actionlogger
ILogger
HystrixCommand(IHystrixCommandOptions, Action, Action, ILogger)
public HystrixCommand(IHystrixCommandOptions commandOptions, Action run = null, Action fallback = null, ILogger logger = null)
Parameters
commandOptions
IHystrixCommandOptionsrun
Actionfallback
Actionlogger
ILogger
Fields
_fallback
protected readonly Action _fallback
Field Value
_run
protected readonly Action _run
Field Value
Methods
DoFallback()
protected override Unit DoFallback()
Returns
- Unit
DoRun()
protected override Unit DoRun()
Returns
- Unit
Execute()
public void Execute()
ExecuteAsync()
public Task ExecuteAsync()
Returns
ExecuteAsync(CancellationToken)
public Task ExecuteAsync(CancellationToken token)
Parameters
token
CancellationToken
Returns
Run()
protected virtual void Run()
RunFallback()
protected virtual void RunFallback()