public final class OSUtils extends Object
| Constructor and Description |
|---|
OSUtils() |
| Modifier and Type | Method and Description |
|---|---|
static Long |
getProcessId(Process process,
org.slf4j.Logger logger) |
private static Long |
getUnixPid(Process process,
org.slf4j.Logger logger) |
(package private) static int |
parseJavaVersion(String version)
Returns the major version parsed from the provided Java version string (e.g.
|
public static Long getProcessId(Process process, org.slf4j.Logger logger)
process - NiFi Process Referencelogger - Logger Reference for DebugProcess and Logger and returns
the platform specific ProcessId for Unix like systems or Handle for Win32 Systems, a.k.a pid
In-case it fails to determine the pid, it will return Null.
Purpose for the Logger is to log any interaction for debugging.static int parseJavaVersion(String version)
"1.8.0.231" -> 8).version - the Java version stringprivate static Long getUnixPid(Process process, org.slf4j.Logger logger)
process - NiFi Process Referencelogger - Logger Reference for DebugProcess and Logger and returns
the platform specific ProcessId for Unix like systems, a.k.a pid
In-case it fails to determine the pid, it will return Null.
Purpose for the Logger is to log any interaction for debugging.Copyright © 2023 Apache NiFi Project. All rights reserved.