Class WindowsOSThreadJNA
java.lang.Object
oshi.software.common.AbstractOSThread
oshi.software.common.os.windows.WindowsOSThread
oshi.software.os.windows.WindowsOSThreadJNA
- All Implemented Interfaces:
OSThread
JNA-based Windows OS thread implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface OSThread
OSThread.ThreadFilteringModifier and TypeInterfaceDescriptionstatic final classConstants which may be used to filter Thread lists -
Constructor Summary
ConstructorsConstructorDescriptionWindowsOSThreadJNA(int pid, int tid, String procName, ThreadPerfCounterBlock pcb) -
Method Summary
Modifier and TypeMethodDescriptionbooleanAttempts to updates process attributes.Methods inherited from class WindowsOSThread
getContextSwitches, getKernelTime, getName, getPriority, getProcName, getStartMemoryAddress, getStartTime, getState, getThreadId, getUpTime, getUserTime, updateAttributesModifier and TypeMethodDescriptionlongA snapshot of the context switches the thread has done.longKernel (privileged) time used by the thread.getName()The name of the thread.intPriority of the thread, the meaning of which is dependent on the OS.protected StringReturns the process name prefix used for thread name construction.longThe memory address above which this thread can run.longThe start time of the thread.getState()Gets the execution state of the task/thread.intThe thread id.longElapsed/up-time of the thread.longUser time used by the thread.protected booleanupdateAttributes(String procName, ThreadPerfCounterBlock pcb) Updates thread attributes from a performance counter block.Methods inherited from class AbstractOSThread
getOwningProcessId, getThreadCpuLoadBetweenTicks, getThreadCpuLoadCumulative, toStringModifier and TypeMethodDescriptionintThe owning process of this thread.doublegetThreadCpuLoadBetweenTicks(OSThread priorSnapshot) Gets CPU usage of this thread since a previous snapshot of the same thread, provided as a parameter.doubleGets cumulative CPU usage of this thread.toString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface OSThread
getMajorFaults, getMinorFaultsModifier and TypeMethodDescriptiondefault longThe number of major (hard) faults the thread has made which have required loading a memory page from disk.default longThe number of minor (soft) faults the thread has made which have not required loading a memory page from disk.
-
Constructor Details
-
WindowsOSThreadJNA
-
-
Method Details
-
updateAttributes
public boolean updateAttributes()Description copied from interface:OSThreadAttempts to updates process attributes. Returns false if the update fails, which will occur if the process no longer exists. Not implemented for macOS, as thread ID is simply an index and not unique.- Returns:
trueif the update was successful, false if the update failed. In addition, on a failed update the thread state will be changed toOSProcess.State.INVALID.
-