Class DMICacheService
java.lang.Object
io.github.eggy03.dmidecode.service.processor.DMICacheService
- All Implemented Interfaces:
CommonDMIServiceInterface<DMICache>
Service class for fetching cache information from the system.
This class executes the DMIType.CACHE dmidecode command
and maps the resulting output into DMICache objects.
Usage examples
DMICacheService service = new DMICacheService();
List<DMICache> caches = service.get(10);
- Since:
- 0.1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Unmodifiable @NonNull List<DMICache> get(long timeout) Retrieves cache entries present in the system using an isolateddmidecodeprocess with a configurable timeout.
-
Constructor Details
-
DMICacheService
public DMICacheService()
-
-
Method Details
-
get
Retrieves cache entries 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 interfaceCommonDMIServiceInterface<DMICache>- Parameters:
timeout- the maximum time (in seconds) to wait for thedmidecodecommand to complete before terminating the process- Returns:
- a list of
DMICacheobjects representing the system cache entries. Returns an empty list if no cache entries are detected. - Since:
- 0.1.0
-