/** * Gets either system property or environment variable with given name. * The result is transformed to {@code boolean} using {@code Boolean.valueOf()} method. * * @param name Name of the system property or environment variable. * @return Boolean value of the system property or environment variable. * Returns {@code False} in case neither system property * nor environment variable with given name is found. */ public static boolean getBoolean(String name) { return getBoolean(name, false); }
/** * @param sb Sb. */ private static void appendJvmId(SB sb) { if (getBoolean(GG_MBEAN_APPEND_JVM_ID)) { String gridId = Integer.toHexString(Grid.class.getClassLoader().hashCode()) + "_" + ManagementFactory.getRuntimeMXBean().getName(); sb.a("jvmId=").a(gridId).a(','); } }
/** {@inheritDoc} */ @Override public void onKernalStart() throws GridException { if (ctx.config().isDaemon()) return; if (!getBoolean(GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK)) { for (GridNode n : ctx.discovery().remoteNodes()) checkGgfsOnRemoteNode(n); } for (GridGgfsContext ggfsCtx : ggfsCache.values()) for (GridGgfsManager mgr : ggfsCtx.managers()) mgr.onKernalStart(); }
return; if (!getBoolean(GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK)) { for (GridNode n : ctx.discovery().remoteNodes()) checkCache(n);
if (!getBoolean(GG_SKIP_CONFIGURATION_CONSISTENCY_CHECK)) { for (GridNode n : ctx.discovery().remoteNodes()) checkStreamer(n);
myCfg.setSmtpPort(smtpPort); myCfg.setSmtpSsl(GridSystemProperties.getBoolean(GG_SMTP_SSL)); if (!GridSystemProperties.getBoolean(GG_NO_SHUTDOWN_HOOK, false)) { try { Runtime.getRuntime().addShutdownHook(shutdownHook = new Thread() {
boolean notifyEnabled = GridSystemProperties.getBoolean(GG_UPDATE_NOTIFIER, true);