/** {@inheritDoc} */ @Override public boolean apply(GridNode n) { return n.isDaemon(); } }
@Override public boolean apply(GridNode n) { return !n.isDaemon(); } };
/** * Short node representation. * * @param n Grid node. * @return Short string representing the node. */ public static String toShortString(GridNode n) { return "GridNode [id=" + n.id() + ", order=" + n.order() + ", addr=" + n.addresses() + ", daemon=" + n.isDaemon() + ']'; }
@Override public Collection<GridNode> remoteDaemonNodes() { final Collection<GridNode> all = ctx.discovery().daemonNodes(); return !localNode().isDaemon() ? all : F.view(all, new GridPredicate<GridNode>() { @Override public boolean apply(GridNode n) { return n.isDaemon(); } }); }
/** * @param g Grid to check for debug flag. * @return {@code true} if debug enabled. * @throws GridException If get operation failed. */ public static boolean debugState(GridEx g) throws GridException { Boolean debug = g.localNode().isDaemon() ? g.<String, Boolean>nodeLocalMap().get(VISOR_DEBUG_KEY) : g.<String, Boolean>cachex(CU.UTILITY_CACHE_NAME).get(VISOR_DEBUG_KEY); return debug != null ? debug : false; }
/** * Set grid debug state. * * @param g Grid to set debug flag. * @param newState New value for debug state. * @throws GridException If get operation failed. */ public static void debugState(GridEx g, Boolean newState) throws GridException { if (g.localNode().isDaemon()) g.<String, Boolean>nodeLocalMap().put(VISOR_DEBUG_KEY, newState); else g.<String, Boolean>cachex(CU.UTILITY_CACHE_NAME).putx(VISOR_DEBUG_KEY, newState); }
if (!loc.isDaemon()) all.add(loc);
boolean daemon = node.isDaemon();
node.id(), addr, node.isDaemon()));
assert node != null; if (node.isDaemon() && !checkDaemon()) { if (log.isDebugEnabled()) log.debug("Skipping configuration consistency check for daemon node: " + node);
if (!isLocDaemon && !n.isDaemon()) { Byte rmtDataCenterId = n.attribute(ATTR_DATA_CENTER_ID);
boolean isDaemon = node.isDaemon();