Package com.ferrumx.system.hardware
Class Win32_CacheMemory
java.lang.Object
com.ferrumx.system.hardware.Win32_CacheMemory
This class contains methods that query the Win32_CacheMemory class of WMI to
fetch CPU Cache information.
Fetches the following properties and their values: DeviceID, Purpose, InstalledSize, Associativity
- Author:
- Egg-03
-
Method Summary
Modifier and TypeMethodDescriptiongetCPUCache
(String cacheID) This method returns the Cache Memory details of a CPU
-
Method Details
-
getCPUCache
public static Map<String,String> getCPUCache(String cacheID) throws IOException, IndexOutOfBoundsException, ShellException, InterruptedException This method returns the Cache Memory details of a CPU- Parameters:
cacheID
- this ID is from the list of cacheIDs produced byWin32_AssociatedProcessorMemory.getCacheID(String)
which in turn retrieves those IDs by taking in the CPU DeviceID fromWin32_Processor.getProcessorList()
- Returns:
- a particular level of cache memory details of a particular CPU at a time
- Throws:
IOException
- re-throws the exception thrown byCIM_ML.getPropertiesAndTheirValuesWhere(String, String, String, String)
when there are I/O Errors during streaming of data from and to Powershell and other generated filesIndexOutOfBoundsException
- re-throws the exception thrown byCIM_ML.getPropertiesAndTheirValuesWhere(String, String, String, String)
when there is a parsing error of data fetched from Windows PowershellShellException
- if any internal command used in the powershell throws errorsInterruptedException
- if the thread waiting for the process to exit, gets interrupted. When catching this exception, you may re-throw it's interrupted status by using Thread.currentThread().interrupt();
-