Package com.orientechnologies.common.jnr
Class ONative
java.lang.Object
com.orientechnologies.common.jnr.ONative
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intAddress space limit.static final int -
Method Summary
Modifier and TypeMethodDescriptiongetMemoryLimit(boolean printSteps) intgetOpenFilesLimit(boolean verbose, int recommended, int defLimit) Detects limit of limit of open files.static ONativeinstance()booleanisOsRoot()
-
Field Details
-
RLIMIT_AS
public static final int RLIMIT_ASAddress space limit.- See Also:
-
RLIMIT_NOFILE
public static final int RLIMIT_NOFILE- See Also:
-
-
Method Details
-
instance
-
getOpenFilesLimit
public int getOpenFilesLimit(boolean verbose, int recommended, int defLimit) Detects limit of limit of open files.- Parameters:
recommended- recommended value of limit of open files.defLimit- default value for limit of open files.- Returns:
- limit of open files, available for the system.
-
getMemoryLimit
- Parameters:
printSteps- Print all steps of discovering of memory limit in the log withINFOlevel.- Returns:
- Amount of memory which are allowed to be consumed by application, and detects whether
OrientDB instance is running inside container. If
nullis returned then it was impossible to detect amount of memory on machine.
-
isOsRoot
public boolean isOsRoot()
-