static void addConsoleCtrlHandler(ConsoleCtrlHandler handler) { if (!JNA_AVAILABLE) { logger.warn("cannot register console handler because JNA is not available"); return; } JNANatives.addConsoleCtrlHandler(handler); }
static boolean definitelyRunningAsRoot() { if (!JNA_AVAILABLE) { logger.warn("cannot check if running as root because JNA is not available"); return false; } return JNANatives.definitelyRunningAsRoot(); }
static void tryMlockall() { if (!JNA_AVAILABLE) { logger.warn("cannot mlockall because JNA is not available"); return; } JNANatives.tryMlockall(); }
static void tryVirtualLock() { if (!JNA_AVAILABLE) { logger.warn("cannot virtual lock because JNA is not available"); return; } JNANatives.tryVirtualLock(); }
if (errno == JNACLibrary.ENOMEM) { if (rlimitSuccess) { logger.warn("Increase RLIMIT_MEMLOCK, soft limit: {}, hard limit: {}", rlimitToString(softLimit), rlimitToString(hardLimit)); if (Constants.LINUX) {
static void tryInstallSystemCallFilter(Path tmpFile) { if (!JNA_AVAILABLE) { logger.warn("cannot install system call filter because JNA is not available"); return; } JNANatives.tryInstallSystemCallFilter(tmpFile); }
static void trySetMaxSizeVirtualMemory() { if (!JNA_AVAILABLE) { logger.warn("cannot getrlimit RLIMIT_AS because JNA is not available"); return; } JNANatives.trySetMaxSizeVirtualMemory(); }
static void trySetMaxNumberOfThreads() { if (!JNA_AVAILABLE) { logger.warn("cannot getrlimit RLIMIT_NPROC because JNA is not available"); return; } JNANatives.trySetMaxNumberOfThreads(); }
static void trySetMaxFileSize() { if (!JNA_AVAILABLE) { logger.warn("cannot getrlimit RLIMIT_FSIZE because JNA is not available"); return; } JNANatives.trySetMaxFileSize(); }
/** * Retrieves the short path form of the specified path. * * @param path the path * @return the short path name (or the original path if getting the short path name fails for any reason) */ static String getShortPathName(final String path) { if (!JNA_AVAILABLE) { logger.warn("cannot obtain short path for [{}] because JNA is not available", path); return path; } return JNANatives.getShortPathName(path); }
static void tryVirtualLock() { if (!JNA_AVAILABLE) { logger.warn("cannot mlockall because JNA is not available"); return; } JNANatives.tryVirtualLock(); }
if (errno == JNACLibrary.ENOMEM) { if (rlimitSuccess) { logger.warn("Increase RLIMIT_MEMLOCK, soft limit: {}, hard limit: {}", rlimitToString(softLimit), rlimitToString(hardLimit)); if (Constants.LINUX) {
static void tryInstallSystemCallFilter(Path tmpFile) { if (!JNA_AVAILABLE) { logger.warn("cannot install system call filter because JNA is not available"); return; } JNANatives.tryInstallSystemCallFilter(tmpFile); }
static void trySetMaxSizeVirtualMemory() { if (!JNA_AVAILABLE) { logger.warn("cannot getrlimit RLIMIT_AS beacuse JNA is not available"); return; } JNANatives.trySetMaxSizeVirtualMemory(); }
static void trySetMaxNumberOfThreads() { if (!JNA_AVAILABLE) { logger.warn("cannot getrlimit RLIMIT_NPROC because JNA is not available"); return; } JNANatives.trySetMaxNumberOfThreads(); }
static void trySetMaxFileSize() { if (!JNA_AVAILABLE) { logger.warn("cannot getrlimit RLIMIT_FSIZE because JNA is not available"); return; } JNANatives.trySetMaxFileSize(); }
/** * Retrieves the short path form of the specified path. * * @param path the path * @return the short path name (or the original path if getting the short path name fails for any reason) */ static String getShortPathName(final String path) { if (!JNA_AVAILABLE) { logger.warn("cannot obtain short path for [{}] because JNA is not avilable", path); return path; } return JNANatives.getShortPathName(path); }
static void addConsoleCtrlHandler(ConsoleCtrlHandler handler) { if (!JNA_AVAILABLE) { logger.warn("cannot register console handler because JNA is not available"); return; } JNANatives.addConsoleCtrlHandler(handler); }
static void tryMlockall() { if (!JNA_AVAILABLE) { logger.warn("cannot mlockall because JNA is not available"); return; } JNANatives.tryMlockall(); }
static void tryVirtualLock() { if (!JNA_AVAILABLE) { logger.warn("cannot virtual lock because JNA is not available"); return; } JNANatives.tryVirtualLock(); }