@Override public boolean apply(Event evt) { info(evt.shortDisplay()); failLatch.countDown(); return true; } }, EVT_NODE_FAILED);
@Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); assertEquals(EVT_JOB_STARTED, evt.type()); nodeIds.add(nodeId); cnt.incrementAndGet(); latch.countDown(); return true; } }),
@Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); assertEquals(EVT_JOB_STARTED, evt.type()); nodeIds.add(nodeId); cnt.incrementAndGet(); latch.countDown(); return true; } },
@Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); assertEquals(EVT_JOB_STARTED, evt.type()); nodeIds.add(nodeId); cnt.incrementAndGet(); latch.countDown(); return true; } },
@Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); assertEquals(EVT_JOB_STARTED, evt.type()); nodeIds.add(nodeId); cnt.incrementAndGet(); latch.countDown(); return true; } },
@Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); assertEquals(EVT_JOB_STARTED, evt.type()); nodeIds.add(nodeId); cnt.incrementAndGet(); latch.countDown(); return false; } },
@Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); assertEquals(EVT_JOB_STARTED, evt.type()); nodeIds.add(nodeId); cnt.incrementAndGet(); latch.countDown(); return true; } }, filter, EVT_JOB_STARTED);
@Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); if (evt.type() == EVT_JOB_STARTED) { nodeIds.add(nodeId); cnt.incrementAndGet(); latch.countDown(); } return true; } },
@Override public boolean apply(Event evt) { info("Local event [" + evt.shortDisplay() + ']'); assertEquals(EVT_JOB_STARTED, evt.type()); cnt.incrementAndGet(); latch.countDown(); return false; } },
@Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); assertEquals(EVT_JOB_STARTED, evt.type()); assertNotNull(grid); nodeIds.add(nodeId); cnt.incrementAndGet(); latch.countDown(); return true; } },
@Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); assertEquals(EVT_JOB_STARTED, evt.type()); nodeIds.add(nodeId); cnt.incrementAndGet(); latch.countDown(); return true; } },
@Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); assertEquals(EVT_JOB_STARTED, evt.type()); nodeIds.add(nodeId); cnt.incrementAndGet(); latch.countDown(); return true; } },
@Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); assertEquals(EVT_JOB_STARTED, evt.type()); nodeIds.add(nodeId); cnt.incrementAndGet(); latch.countDown(); return true; } },
@Override public boolean apply(UUID nodeId, Event evt) { info("Event from " + nodeId + " [" + evt.shortDisplay() + ']'); assertEquals(EVT_JOB_STARTED, evt.type()); nodeIds.add(nodeId); cnt.incrementAndGet(); latch.countDown(); return true; } },
else res.add(new VisorGridEvent( e.type(), e.id(), e.name(), e.node().id(), e.timestamp(), e.message(), e.shortDisplay() ));
/** {@inheritDoc} */ @Override public VisorGridEvent apply(Event evt) { return map(evt, evt.type(), evt.id(), evt.name(), evt.node().id(), evt.timestamp(), evt.message(), evt.shortDisplay()); } }
/** {@inheritDoc} */ @Override public boolean apply(Event evt) { assert evt instanceof CacheEvent; if (!listen) return true; if (TEST_INFO) X.println("Cache event: " + evt.shortDisplay()); AtomicInteger cntr = F.addIfAbsent(cntrs, evt.type(), F.newAtomicInt()); assert cntr != null; int cnt = cntr.incrementAndGet(); for (EventTypeFuture f : futs) f.onEvent(evt.type(), cnt); return true; }
else res.add(new VisorGridEvent( e.type(), e.id(), e.name(), e.node().id(), e.timestamp(), e.message(), e.shortDisplay() ));
/** {@inheritDoc} */ @Override public VisorGridEvent apply(Event evt) { return map(evt, evt.type(), evt.id(), evt.name(), evt.node().id(), evt.timestamp(), evt.message(), evt.shortDisplay()); } }