Package software.amazon.awssdk.crt
Class Process
java.lang.Object
software.amazon.awssdk.crt.Process
Encapsulates Process information and manipulation of process level operations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic longGets the hard limit for IO handles for this process (max fds in unix terminology).static longGets the soft limit for IO handles for this process (max fds in unix terminology)static intgetPid()Gets the process id of the running process.static voidsetMaxIOHandlesSoftLimit(long maxHandles) Sets the soft limit for IO handles for this process (max fds in unix terminology).
-
Constructor Details
-
Process
public Process()
-
-
Method Details
-
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.
-