C# 클래스 Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.Implementation.WebAppPerformanceCollector.CacheHelper

Class to contain the one cache for all Gauges.
상속: ICachedEnvironmentVariableAccess
파일 보기 프로젝트 열기: Microsoft/ApplicationInsights-dotnet-server

공개 메소드들

메소드 설명
GetCounterValue ( string name, AzureWebApEnvironmentVariables environmentVariable ) : long

Checks if a key is in the cache and if not Retrieves raw counter data from Environment Variables Cleans raw JSON for only requested counter Creates value for caching.

GetFromCache ( string cacheKey ) : object

Retrieves requested item from cache.

IsInCache ( string cacheKey ) : bool

Method to check if a key is in a cache.

PerformanceCounterValue ( string performanceCounterName, string json ) : long

Search for the value of a given performance counter in a JSON.

SaveToCache ( string cacheKey, object toCache, DateTimeOffset absoluteExpiration ) : void

Method saves an object to the cache.

비공개 메소드들

메소드 설명
CacheHelper ( ) : System

Prevents a default instance of the CacheHelper class from being created.

메소드 상세

GetCounterValue() 공개 메소드

Checks if a key is in the cache and if not Retrieves raw counter data from Environment Variables Cleans raw JSON for only requested counter Creates value for caching.
public GetCounterValue ( string name, AzureWebApEnvironmentVariables environmentVariable ) : long
name string Cache key and name of the counter to be selected from JSON.
environmentVariable AzureWebApEnvironmentVariables Identifier of the environment variable.
리턴 long

GetFromCache() 공개 메소드

Retrieves requested item from cache.
public GetFromCache ( string cacheKey ) : object
cacheKey string Key for the retrieved object.
리턴 object

IsInCache() 공개 메소드

Method to check if a key is in a cache.
public IsInCache ( string cacheKey ) : bool
cacheKey string Key to search for in cache.
리턴 bool

PerformanceCounterValue() 공개 메소드

Search for the value of a given performance counter in a JSON.
public PerformanceCounterValue ( string performanceCounterName, string json ) : long
performanceCounterName string The name of the performance counter.
json string String containing the JSON.
리턴 long

SaveToCache() 공개 메소드

Method saves an object to the cache.
public SaveToCache ( string cacheKey, object toCache, DateTimeOffset absoluteExpiration ) : void
cacheKey string String name of the counter value to be saved to cache.
toCache object Object to be cached.
absoluteExpiration DateTimeOffset DateTimeOffset until item expires from cache.
리턴 void