Package org.apache.iotdb.commons.utils
Class JVMCommonUtils
- java.lang.Object
-
- org.apache.iotdb.commons.utils.JVMCommonUtils
-
public class JVMCommonUtils extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_EXECUTOR_POOL_SIZEDefault executor pool maximum size.
-
Constructor Summary
Constructors Constructor Description JVMCommonUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetCpuCores()static doublegetDiskFreeRatio(java.lang.String dir)static intgetJdkVersion()get JDK version.static intgetMaxExecutorPoolSize()static longgetOccupiedSpace(java.lang.String folderPath)static longgetUsableSpace(java.lang.String dir)NOTICE: This method is currently used only for data dir, thus using FSFactory to get filestatic booleanhasSpace(java.lang.String dir)
-
-
-
Method Detail
-
getJdkVersion
public static int getJdkVersion()
get JDK version.- Returns:
- JDK version (int type)
-
getUsableSpace
public static long getUsableSpace(java.lang.String dir)
NOTICE: This method is currently used only for data dir, thus using FSFactory to get file- Parameters:
dir- directory path- Returns:
-
getDiskFreeRatio
public static double getDiskFreeRatio(java.lang.String dir)
-
hasSpace
public static boolean hasSpace(java.lang.String dir)
-
getOccupiedSpace
public static long getOccupiedSpace(java.lang.String folderPath) throws java.io.IOException- Throws:
java.io.IOException
-
getCpuCores
public static int getCpuCores()
-
getMaxExecutorPoolSize
public static int getMaxExecutorPoolSize()
-
-