Class DMIPhysicalMemoryArrayService
java.lang.Object
io.github.eggy03.dmidecode.service.memory.DMIPhysicalMemoryArrayService
- All Implemented Interfaces:
OptionalCommonDMIServiceInterface<DMIPhysicalMemoryArray>
public class DMIPhysicalMemoryArrayService
extends Object
implements OptionalCommonDMIServiceInterface<DMIPhysicalMemoryArray>
Service class for fetching physical memory array information from the system.
This class executes the DMIType.PHYSICAL_MEMORY_ARRAY dmidecode command
and maps the resulting output into a DMIPhysicalMemoryArray object.
Usage examples
DMIPhysicalMemoryArrayService service = new DMIPhysicalMemoryArrayService();
Optional<DMIPhysicalMemoryArray> memoryArray = service.get(10);
- Since:
- 0.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull Optional<DMIPhysicalMemoryArray> get(long timeout) Retrieves physical memory array information present in the system using an isolateddmidecodeprocess with a configurable timeout.
-
Constructor Details
-
DMIPhysicalMemoryArrayService
public DMIPhysicalMemoryArrayService()
-
-
Method Details
-
get
Retrieves physical memory array information present in the system using an isolateddmidecodeprocess with a configurable timeout.The process is pre-maturely terminated if execution exceeds the specified timeout.
- Specified by:
getin interfaceOptionalCommonDMIServiceInterface<DMIPhysicalMemoryArray>- Parameters:
timeout- the maximum time (in seconds) to wait for thedmidecodecommand to complete before terminating the process- Returns:
- an
OptionalcontainingDMIPhysicalMemoryArrayinformation if present, orOptional.empty()if no physical memory array entry is detected - Since:
- 0.1.0
-