/** * Checks for explicit events configuration. * * @param ignite Grid instance. * @return {@code true} if all task events explicitly specified in configuration. */ public static boolean checkExplicitTaskMonitoring(Ignite ignite) { int[] evts = ignite.configuration().getIncludeEventTypes(); if (F.isEmpty(evts)) return false; for (int evt : VISOR_TASK_EVTS) { if (!F.contains(evts, evt)) return false; } return true; }
/** * Injects resources. * * @param ignite Ignite */ @IgniteInstanceResource private void injectResources(Ignite ignite) { if (ignite != null) { // Inject resources. gridName = ignite.name(); locNodeId = ignite.configuration().getNodeId(); } else { // Cleanup resources. gridName = null; locNodeId = null; } }