Package com.complexible.common.base

# Class OSUtil

java.lang.Object
com.complexible.common.base.OSUtil

public final class OSUtil extends Object

Author:
  Evren Sirin

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `OSUtil.NativeMemoryUsage`
  Native memory usage info collected from OS.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final OSUtil.NativeMemoryUsage`
  `ERROR`
  Constant instance with memory usages set to 0 that indicates no memory info was retrieved.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static OSUtil.NativeMemoryUsage`
  `getNativeMemory()`
  Returns a string with information about native memory usage or `ERROR` if an error occurs.
  `static String`
  `getNativeMemoryInfo()`
  Returns a string with information about native memory usage of "N/A" if an error occurs.
  `static long`
  `getPID()`
  Returns the process ID for the JVM or -1 if the process ID cannot be determined.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### ERROR

    public static final OSUtil.NativeMemoryUsage ERROR
    Constant instance with memory usages set to 0 that indicates no memory info was retrieved.

- ## Method Details

  - ### getNativeMemory

    public static OSUtil.NativeMemoryUsage getNativeMemory()
    Returns a string with information about native memory usage or `ERROR` if an error occurs.

  - ### getNativeMemoryInfo

    public static String getNativeMemoryInfo()
    Returns a string with information about native memory usage of "N/A" if an error occurs.

  - ### getPID

    public static long getPID()
    Returns the process ID for the JVM or -1 if the process ID cannot be determined.