Class Process


  • public class Process
    extends java.lang.Object
    Encapsulates Process information and manipulation of process level operations.
    • Constructor Summary

      Constructors 
      Constructor Description
      Process()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static long getMaxIOHandlesHardLimit()
      Gets the hard limit for IO handles for this process (max fds in unix terminology).
      static long getMaxIOHandlesSoftLimit()
      Gets the soft limit for IO handles for this process (max fds in unix terminology)
      static int getPid()
      Gets the process id of the running process.
      static void setMaxIOHandlesSoftLimit​(long maxHandles)
      Sets the soft limit for IO handles for this process (max fds in unix terminology).
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Process

        public Process()
    • Method Detail

      • getPid

        public static int getPid()
        Gets the process id of the running process.
        Returns:
        process id.
      • getMaxIOHandlesSoftLimit

        public static long getMaxIOHandlesSoftLimit()
        Gets the soft limit for IO handles for this process (max fds in unix terminology)
        Returns:
        soft limit for IO handles.
      • getMaxIOHandlesHardLimit

        public static long getMaxIOHandlesHardLimit()
        Gets the hard limit for IO handles for this process (max fds in unix terminology). This value cannot be altered without root permissions.
        Returns:
        hard limit for IO handles.
      • setMaxIOHandlesSoftLimit

        public static void setMaxIOHandlesSoftLimit​(long maxHandles)
        Sets the soft limit for IO handles for this process (max fds in unix terminology). maxHandles may not exceed the return value of getMaxIOHandlesHardLimit(). In addition, avoid calling this function unless you've checked getMaxIOHandlesSoftLimit() is actually less than getMaxIOHandlesHardLimit() since this function will always fail on some platforms (such as windows) where there are no practical limits in the first place.
        Parameters:
        maxHandles - new soft limit for this process.
        Throws:
        CrtRuntimeException - if the operation fails due to illegal arguments or the opereration is unsupported on the current platform.