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
groupIHystrixCommandGroupKeykeyIHystrixCommandKeythreadPoolKeyIHystrixThreadPoolKeycircuitBreakerIHystrixCircuitBreakerthreadPoolIHystrixThreadPoolcommandOptionsDefaultsIHystrixCommandOptionsthreadPoolOptionsDefaultsIHystrixThreadPoolOptionsmetricsHystrixCommandMetricsfallbackSemaphoreSemaphoreSlimexecutionSemaphoreSemaphoreSlimoptionsStrategyHystrixOptionsStrategyexecutionHookHystrixCommandExecutionHookrunActionfallbackActionloggerILogger
HystrixCommand(IHystrixCommandGroupKey, IHystrixThreadPoolKey, Action, Action, ILogger)
public HystrixCommand(IHystrixCommandGroupKey group, IHystrixThreadPoolKey threadPool, Action run = null, Action fallback = null, ILogger logger = null)
Parameters
groupIHystrixCommandGroupKeythreadPoolIHystrixThreadPoolKeyrunActionfallbackActionloggerILogger
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
groupIHystrixCommandGroupKeythreadPoolIHystrixThreadPoolKeyexecutionIsolationThreadTimeoutInMillisecondsintrunActionfallbackActionloggerILogger
HystrixCommand(IHystrixCommandGroupKey, Action, Action, ILogger)
public HystrixCommand(IHystrixCommandGroupKey group, Action run = null, Action fallback = null, ILogger logger = null)
Parameters
groupIHystrixCommandGroupKeyrunActionfallbackActionloggerILogger
HystrixCommand(IHystrixCommandGroupKey, int, Action, Action, ILogger)
public HystrixCommand(IHystrixCommandGroupKey group, int executionIsolationThreadTimeoutInMilliseconds, Action run = null, Action fallback = null, ILogger logger = null)
Parameters
groupIHystrixCommandGroupKeyexecutionIsolationThreadTimeoutInMillisecondsintrunActionfallbackActionloggerILogger
HystrixCommand(IHystrixCommandOptions, Action, Action, ILogger)
public HystrixCommand(IHystrixCommandOptions commandOptions, Action run = null, Action fallback = null, ILogger logger = null)
Parameters
commandOptionsIHystrixCommandOptionsrunActionfallbackActionloggerILogger
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
tokenCancellationToken
Returns
Run()
protected virtual void Run()
RunFallback()
protected virtual void RunFallback()