Class: Fluent::Plugin::CacheManager
- Inherits:
-
Object
- Object
- Fluent::Plugin::CacheManager
- Includes:
- Constants
- Defined in:
- lib/fluent/plugin/in_windows_exporter.rb
Constant Summary
Constants included from Constants
Fluent::Plugin::Constants::PERF_100NSEC_TIMER, Fluent::Plugin::Constants::PERF_ELAPSED_TIME, Fluent::Plugin::Constants::PERF_PRECISION_100NS_TIMER, Fluent::Plugin::Constants::TICKS_TO_SECONDS_SCALE_FACTOR, Fluent::Plugin::Constants::WINDOWS_EPOCH
Instance Attribute Summary collapse
-
#hkey_perf_data_cache ⇒ Object
readonly
Returns the value of attribute hkey_perf_data_cache.
-
#memory_status_cache ⇒ Object
readonly
Returns the value of attribute memory_status_cache.
-
#performance_info_cache ⇒ Object
readonly
Returns the value of attribute performance_info_cache.
-
#registry_info_cache ⇒ Object
readonly
Returns the value of attribute registry_info_cache.
-
#work_station_info_cache ⇒ Object
readonly
Returns the value of attribute work_station_info_cache.
Instance Method Summary collapse
-
#initialize ⇒ CacheManager
constructor
A new instance of CacheManager.
- #update ⇒ Object
Constructor Details
#initialize ⇒ CacheManager
Returns a new instance of CacheManager.
829 830 831 832 833 834 835 836 837 838 839 840 |
# File 'lib/fluent/plugin/in_windows_exporter.rb', line 829 def initialize @hkey_perf_data_reader = HKeyPerfDataReader::Reader.new( object_name_whitelist: HKeyPerfDataWhiteList::NAMES, logger: $log ) @hkey_perf_data_cache = nil @memory_status_cache = nil @work_station_info_cache = nil @performance_info_cache = nil @registry_info_cache = nil end |
Instance Attribute Details
#hkey_perf_data_cache ⇒ Object (readonly)
Returns the value of attribute hkey_perf_data_cache.
823 824 825 |
# File 'lib/fluent/plugin/in_windows_exporter.rb', line 823 def hkey_perf_data_cache @hkey_perf_data_cache end |
#memory_status_cache ⇒ Object (readonly)
Returns the value of attribute memory_status_cache.
824 825 826 |
# File 'lib/fluent/plugin/in_windows_exporter.rb', line 824 def memory_status_cache @memory_status_cache end |
#performance_info_cache ⇒ Object (readonly)
Returns the value of attribute performance_info_cache.
826 827 828 |
# File 'lib/fluent/plugin/in_windows_exporter.rb', line 826 def performance_info_cache @performance_info_cache end |
#registry_info_cache ⇒ Object (readonly)
Returns the value of attribute registry_info_cache.
827 828 829 |
# File 'lib/fluent/plugin/in_windows_exporter.rb', line 827 def registry_info_cache @registry_info_cache end |
#work_station_info_cache ⇒ Object (readonly)
Returns the value of attribute work_station_info_cache.
825 826 827 |
# File 'lib/fluent/plugin/in_windows_exporter.rb', line 825 def work_station_info_cache @work_station_info_cache end |
Instance Method Details
#update ⇒ Object
842 843 844 845 846 847 848 |
# File 'lib/fluent/plugin/in_windows_exporter.rb', line 842 def update @hkey_perf_data_cache = get_hkey_perf_data() @memory_status_cache = WinFFI.GetMemoryStatus() @work_station_info_cache = WinFFI.GetWorkstationInfo() @performance_info_cache = WinFFI.GetPerformanceInfo() @registry_info_cache = WinFFI.GetRegistryInfo() end |