Class HystrixCommand<TResult>
Inheritance
System.Object
HystrixCommand<TResult>
Assembly: Steeltoe.CircuitBreaker.HystrixBase.dll
Syntax
public class HystrixCommand<TResult> : AbstractCommand<TResult>, IHystrixInvokableInfo, IHystrixExecutable<TResult>, IHystrixObservable<TResult>, IHystrixInvokable
Type Parameters
Constructors
|
Edit this page
View Source
HystrixCommand(IHystrixCommandGroupKey, Func<TResult>, Func<TResult>, ILogger)
Declaration
public HystrixCommand(IHystrixCommandGroupKey group, Func<TResult> run = null, Func<TResult> fallback = null, ILogger logger = null)
Parameters
|
Edit this page
View Source
HystrixCommand(IHystrixCommandGroupKey, IHystrixCommandKey, IHystrixThreadPoolKey, IHystrixCircuitBreaker, IHystrixThreadPool, IHystrixCommandOptions, IHystrixThreadPoolOptions, HystrixCommandMetrics, SemaphoreSlim, SemaphoreSlim, HystrixOptionsStrategy, HystrixCommandExecutionHook, Func<TResult>, Func<TResult>, ILogger)
Declaration
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, Func<TResult> run, Func<TResult> fallback, ILogger logger = null)
Parameters
|
Edit this page
View Source
HystrixCommand(IHystrixCommandGroupKey, IHystrixThreadPoolKey, Func<TResult>, Func<TResult>, ILogger)
Declaration
public HystrixCommand(IHystrixCommandGroupKey group, IHystrixThreadPoolKey threadPool, Func<TResult> run = null, Func<TResult> fallback = null, ILogger logger = null)
Parameters
|
Edit this page
View Source
HystrixCommand(IHystrixCommandGroupKey, IHystrixThreadPoolKey, Int32, Func<TResult>, Func<TResult>, ILogger)
Declaration
public HystrixCommand(IHystrixCommandGroupKey group, IHystrixThreadPoolKey threadPool, int executionIsolationThreadTimeoutInMilliseconds, Func<TResult> run = null, Func<TResult> fallback = null, ILogger logger = null)
Parameters
|
Edit this page
View Source
HystrixCommand(IHystrixCommandGroupKey, Int32, Func<TResult>, Func<TResult>, ILogger)
Declaration
public HystrixCommand(IHystrixCommandGroupKey group, int executionIsolationThreadTimeoutInMilliseconds, Func<TResult> run = null, Func<TResult> fallback = null, ILogger logger = null)
Parameters
Type |
Name |
Description |
IHystrixCommandGroupKey |
group |
|
System.Int32 |
executionIsolationThreadTimeoutInMilliseconds |
|
Func<TResult> |
run |
|
Func<TResult> |
fallback |
|
ILogger |
logger |
|
|
Edit this page
View Source
HystrixCommand(IHystrixCommandOptions, Func<TResult>, Func<TResult>, ILogger)
Declaration
public HystrixCommand(IHystrixCommandOptions commandOptions, Func<TResult> run = null, Func<TResult> fallback = null, ILogger logger = null)
Parameters
Type |
Name |
Description |
IHystrixCommandOptions |
commandOptions |
|
Func<TResult> |
run |
|
Func<TResult> |
fallback |
|
ILogger |
logger |
|
Fields
|
Edit this page
View Source
_fallback
Declaration
protected readonly Func<TResult> _fallback
Field Value
Type |
Description |
Func<TResult> |
|
|
Edit this page
View Source
_run
Declaration
protected readonly Func<TResult> _run
Field Value
Type |
Description |
Func<TResult> |
|
Methods
|
Edit this page
View Source
DoFallback()
Declaration
protected override TResult DoFallback()
Returns
Overrides
Steeltoe.CircuitBreaker.Hystrix.AbstractCommand<TResult>.DoFallback()
|
Edit this page
View Source
DoRun()
Declaration
protected override TResult DoRun()
Returns
Overrides
Steeltoe.CircuitBreaker.Hystrix.AbstractCommand<TResult>.DoRun()
|
Edit this page
View Source
Execute()
Declaration
Returns
|
Edit this page
View Source
ExecuteAsync()
Declaration
public Task<TResult> ExecuteAsync()
Returns
Type |
Description |
Task<TResult> |
|
|
Edit this page
View Source
ExecuteAsync(CancellationToken)
Declaration
public Task<TResult> ExecuteAsync(CancellationToken token)
Parameters
Type |
Name |
Description |
CancellationToken |
token |
|
Returns
Type |
Description |
Task<TResult> |
|
|
Edit this page
View Source
Observe()
Declaration
public IObservable<TResult> Observe()
Returns
Type |
Description |
IObservable<TResult> |
|
|
Edit this page
View Source
Observe(CancellationToken)
Declaration
public IObservable<TResult> Observe(CancellationToken token)
Parameters
Type |
Name |
Description |
CancellationToken |
token |
|
Returns
Type |
Description |
IObservable<TResult> |
|
|
Edit this page
View Source
Run()
Declaration
protected virtual TResult Run()
Returns
|
Edit this page
View Source
RunAsync()
Declaration
protected virtual async Task<TResult> RunAsync()
Returns
Type |
Description |
Task<TResult> |
|
|
Edit this page
View Source
RunFallback()
Declaration
protected virtual TResult RunFallback()
Returns
|
Edit this page
View Source
RunFallbackAsync()
Declaration
protected virtual async Task<TResult> RunFallbackAsync()
Returns
Type |
Description |
Task<TResult> |
|
|
Edit this page
View Source
ToObservable()
Declaration
public IObservable<TResult> ToObservable()
Returns
Type |
Description |
IObservable<TResult> |
|
Implements