lm::LoadMonitor::SystemEnumCache Class Reference

Cache for system related counters. More...

Inheritance diagram for lm::LoadMonitor::SystemEnumCache:

lm::LoadMonitor::PerformanceCounterEnumCache

Public Member Functions

 SystemEnumCache (void)
 Create new cache object.
virtual ~SystemEnumCache (void)
 Free used resources.
virtual bool AddToRefresher (IWbemConfigureRefresher *configure, IWbemServices *services)
 Add object to the refresher.
virtual void Release (void)
 Free resources.
virtual bool QueryData (LoadSample &target)
 Query data.

Protected Member Functions

virtual bool CacheImpl (IWbemObjectAccess *access_object)
 Cache property handles.

Private Attributes

IWbemHiPerfEnum * enum_system
 Enumerator for Win32_PerfRawData_PerfOS_System or Win32_PerfFormattedData_PerfOS_System.
long enum_system_id
 ID of the system enumerator.
long id_processes
 ID of the "Processes" property.
long id_processor_queue
 ID of the "ProcessorQueueLength" property.

Detailed Description

Cache for system related counters.


Constructor & Destructor Documentation

lm::LoadMonitor::SystemEnumCache::SystemEnumCache ( void   ) 

Create new cache object.

lm::LoadMonitor::SystemEnumCache::~SystemEnumCache ( void   )  [virtual]

Free used resources.


Member Function Documentation

bool lm::LoadMonitor::SystemEnumCache::AddToRefresher ( IWbemConfigureRefresher *  configure,
IWbemServices *  services 
) [virtual]

Add object to the refresher.

Parameters:
configure Configure refresher which will be used to add required objects to the refresher.
services WMI service provider.
Returns:
true on success, false otherwise.

Implements lm::LoadMonitor::PerformanceCounterEnumCache.

bool lm::LoadMonitor::SystemEnumCache::CacheImpl ( IWbemObjectAccess *  access_object  )  [protected, virtual]

Cache property handles.

Parameters:
access_object Object which contains all properties that need to be cached.
Returns:
true on success, false otherwise.

Implements lm::LoadMonitor::PerformanceCounterEnumCache.

bool lm::LoadMonitor::SystemEnumCache::QueryData ( LoadSample target  )  [virtual]

Query data.

Query data after it has been refreshed. This will collect all data from enumerators previously registered with refresher via AddToRefresher method and store resulting data in provided load sample. If data are stored in array (e.g. CPU usage on multi-processor machines), arrays will be automatically allocated. If query fails, sample will remain unmodified.

Parameters:
target Reference to the load sample which will receive data.
Returns:
true on success, false otherwise.

Implements lm::LoadMonitor::PerformanceCounterEnumCache.

void lm::LoadMonitor::SystemEnumCache::Release ( void   )  [virtual]

Free resources.

Implements lm::LoadMonitor::PerformanceCounterEnumCache.


Field Documentation

IWbemHiPerfEnum* lm::LoadMonitor::SystemEnumCache::enum_system [private]

Enumerator for Win32_PerfRawData_PerfOS_System or Win32_PerfFormattedData_PerfOS_System.

long lm::LoadMonitor::SystemEnumCache::enum_system_id [private]

ID of the system enumerator.

long lm::LoadMonitor::SystemEnumCache::id_processes [private]

ID of the "Processes" property.

long lm::LoadMonitor::SystemEnumCache::id_processor_queue [private]

ID of the "ProcessorQueueLength" property.


The documentation for this class was generated from the following files:
Generated on Tue Dec 19 17:43:50 2006 for Load Monitor for Windows by  doxygen 1.4.7