• Home
Show / Hide Table of Contents

Interface IHystrixCommand

Namespace: Hystrix.Dotnet
Assembly: Hystrix.Dotnet.dll
Syntax
public interface IHystrixCommand

Properties

| Improve this Doc View Source

CircuitBreaker

Returns the internal circuit breaker

Declaration
IHystrixCircuitBreaker CircuitBreaker { get; }
Property Value
Type Description
IHystrixCircuitBreaker
| Improve this Doc View Source

CommandIdentifier

Returns the identifier

Declaration
HystrixCommandIdentifier CommandIdentifier { get; }
Property Value
Type Description
HystrixCommandIdentifier
| Improve this Doc View Source

CommandMetrics

Exposes the metrics

Declaration
IHystrixCommandMetrics CommandMetrics { get; }
Property Value
Type Description
IHystrixCommandMetrics
| Improve this Doc View Source

ConfigurationService

Declaration
IHystrixConfigurationService ConfigurationService { get; }
Property Value
Type Description
IHystrixConfigurationService
| Improve this Doc View Source

ThreadPoolMetrics

Declaration
IHystrixThreadPoolMetrics ThreadPoolMetrics { get; }
Property Value
Type Description
IHystrixThreadPoolMetrics

Methods

| Improve this Doc View Source

Execute<T>(Func<T>, Func<T>, CancellationTokenSource)

Runs the synchronous primaryFunction wrapped by circuit breaker and timeout pattern, with a fallback function; an error, timeout or open circuit breaker will execute the fallbackFunction

Declaration
T Execute<T>(Func<T> primaryFunction, Func<T> fallbackFunction, CancellationTokenSource cancellationTokenSource = null)
Parameters
Type Name Description
System.Func<T> primaryFunction
System.Func<T> fallbackFunction
System.Threading.CancellationTokenSource cancellationTokenSource
Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

Execute<T>(Func<T>, CancellationTokenSource)

Runs the synchronous primaryFunction wrapped by circuit breaker and timeout pattern, without a fallback; an error, timeout or open circuit breaker will result in a HystrixCommandException

Declaration
T Execute<T>(Func<T> primaryFunction, CancellationTokenSource cancellationTokenSource = null)
Parameters
Type Name Description
System.Func<T> primaryFunction

The operation to execute.

System.Threading.CancellationTokenSource cancellationTokenSource

The cancellation token source.

Returns
Type Description
T
Type Parameters
Name Description
T
| Improve this Doc View Source

ExecuteAsync<T>(Func<Task<T>>, Func<Task<T>>, CancellationTokenSource)

Runs the asynchronous primaryFunction wrapped by circuit breaker and timeout pattern, with a fallback function; an error, timeout or open circuit breaker will execute the fallbackFunction

Declaration
Task<T> ExecuteAsync<T>(Func<Task<T>> primaryFunction, Func<Task<T>> fallbackFunction, CancellationTokenSource cancellationTokenSource = null)
Parameters
Type Name Description
System.Func<System.Threading.Tasks.Task<T>> primaryFunction
System.Func<System.Threading.Tasks.Task<T>> fallbackFunction
System.Threading.CancellationTokenSource cancellationTokenSource
Returns
Type Description
System.Threading.Tasks.Task<T>
Type Parameters
Name Description
T
| Improve this Doc View Source

ExecuteAsync<T>(Func<Task<T>>, CancellationTokenSource)

Runs the asynchronous primaryFunction wrapped by circuit breaker and timeout pattern, without a fallback; an error, timeout or open circuit breaker will result in a HystrixCommandException

Declaration
Task<T> ExecuteAsync<T>(Func<Task<T>> primaryFunction, CancellationTokenSource cancellationTokenSource = null)
Parameters
Type Name Description
System.Func<System.Threading.Tasks.Task<T>> primaryFunction
System.Threading.CancellationTokenSource cancellationTokenSource
Returns
Type Description
System.Threading.Tasks.Task<T>
Type Parameters
Name Description
T
  • Improve this Doc
  • View Source
In This Article
  • Properties
    • CircuitBreaker
    • CommandIdentifier
    • CommandMetrics
    • ConfigurationService
    • ThreadPoolMetrics
  • Methods
    • Execute<T>(Func<T>, Func<T>, CancellationTokenSource)
    • Execute<T>(Func<T>, CancellationTokenSource)
    • ExecuteAsync<T>(Func<Task<T>>, Func<Task<T>>, CancellationTokenSource)
    • ExecuteAsync<T>(Func<Task<T>>, CancellationTokenSource)
Back to top Licensed under MIT by Travix International.
Generated by DocFX.