C# Class Elders.Hystrix.NET.ThreadPool.HystrixThreadPoolMetrics

Used by IHystrixThreadPool to record metrics. Thread-safe and ensures only 1 HystrixThreadPoolMetrics per HystrixThreadPoolKey.
Mostrar archivo Open project: Elders/Hystrix.NET Class Usage Examples

Public Methods

Method Description
GetInstance ( HystrixThreadPoolKey key ) : HystrixThreadPoolMetrics

Gets the HystrixThreadPoolMetrics instance for a given HystrixThreadPoolKey or null if none exists.

GetInstance ( HystrixThreadPoolKey key, ThreadPoolExecutor threadPool, IHystrixThreadPoolProperties properties ) : HystrixThreadPoolMetrics

Gets the HystrixThreadPoolMetrics instance for a given HystrixThreadPoolKey. If no metrics exists for the specified key, a new one will be created from the specified threadPool and setter.

MarkThreadCompletion ( ) : void

Marks the completion of a command execution.

MarkThreadExecution ( ) : void

Marks the beginning of a command execution.

Private Methods

Method Description
HystrixThreadPoolMetrics ( HystrixThreadPoolKey threadPoolKey, ThreadPoolExecutor threadPool, IHystrixThreadPoolProperties properties ) : System.Collections.Concurrent

Initializes a new instance of the HystrixThreadPoolMetrics class.

SetMaxActiveThreads ( ) : void

Records the current number of active threads in the rolling number.

Method Details

GetInstance() public static method

Gets the HystrixThreadPoolMetrics instance for a given HystrixThreadPoolKey or null if none exists.
public static GetInstance ( HystrixThreadPoolKey key ) : HystrixThreadPoolMetrics
key HystrixThreadPoolKey Key of the tracked thread pool.
return HystrixThreadPoolMetrics

GetInstance() public static method

Gets the HystrixThreadPoolMetrics instance for a given HystrixThreadPoolKey. If no metrics exists for the specified key, a new one will be created from the specified threadPool and setter.
public static GetInstance ( HystrixThreadPoolKey key, ThreadPoolExecutor threadPool, IHystrixThreadPoolProperties properties ) : HystrixThreadPoolMetrics
key HystrixThreadPoolKey Key of the tracked thread pool.
threadPool Java.Util.Concurrent.ThreadPoolExecutor The thread pool executor of the tracked pool.
properties IHystrixThreadPoolProperties The properties of the tracked pool.
return HystrixThreadPoolMetrics

MarkThreadCompletion() public method

Marks the completion of a command execution.
public MarkThreadCompletion ( ) : void
return void

MarkThreadExecution() public method

Marks the beginning of a command execution.
public MarkThreadExecution ( ) : void
return void