Package org.apache.maven.surefire.booter
Class ProcessInfo
java.lang.Object
org.apache.maven.surefire.booter.ProcessInfo
Immutable object which encapsulates PID and elapsed time (Unix) or start time (Windows).
Methods (
Methods (
getPID(), getTime(), isTimeBefore(ProcessInfo), isTimeEqualTo(ProcessInfo))
throw IllegalStateException
if canUse() returns false or isError() returns true.- Since:
- 2.20.1
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final ProcessInfo(package private) static final ProcessInfoprivate final Stringprivate final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) booleancanUse()private void(package private) StringgetPID()(package private) longgetTime()(package private) booleanisError()(package private) boolean(package private) booleanisTimeBefore(ProcessInfo that) (package private) booleanisTimeEqualTo(ProcessInfo that) (package private) static ProcessInfounixProcessInfo(String pid, long etime) On Unix we do not get PID due to the command is interested only to etime of PPID:(package private) static ProcessInfowindowsProcessInfo(String pid, long startTimestamp)
-
Field Details
-
INVALID_PROCESS_INFO
-
ERR_PROCESS_INFO
-
pid
-
time
private final long time
-
-
Constructor Details
-
ProcessInfo
-
-
Method Details
-
unixProcessInfo
On Unix we do not get PID due to the command is interested only to etime of PPID:
/bin/ps -o etime= -p 123
-
windowsProcessInfo
-
canUse
boolean canUse() -
isInvalid
boolean isInvalid() -
isError
boolean isError() -
getPID
String getPID() -
getTime
long getTime() -
isTimeEqualTo
-
isTimeBefore
-
checkValid
private void checkValid()
-