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

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

Méthodes publiques

Méthode 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

Méthode 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 méthode

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.
Résultat HystrixThreadPoolMetrics

GetInstance() public static méthode

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.
Résultat HystrixThreadPoolMetrics

MarkThreadCompletion() public méthode

Marks the completion of a command execution.
public MarkThreadCompletion ( ) : void
Résultat void

MarkThreadExecution() public méthode

Marks the beginning of a command execution.
public MarkThreadExecution ( ) : void
Résultat void