/** {@inheritDoc} */ @Override public boolean equals(Object o) { assert id != null; return this == o || o instanceof GridEventAdapter && id.equals(((GridEvent)o).id()); }
/** {@inheritDoc} */ @Override public int compareTo(GridEvent o) { return o == null ? 1 : id.compareTo(o.id()); }
/** * Gets event predicate that returns {@code true} only if node that produced the event * is one of the given. Note that if array of provided nodes is {@code null} or empty * this method returns predicate that evaluates to {@code false} when applying. * * @param nodes Nodes. * @return Event predicate. */ public static GridPredicate<GridEvent> eventNode(@Nullable final Collection<? extends GridNode> nodes) { return isEmpty(nodes) ? F.<GridEvent>alwaysFalse() : new GridPredicate<GridEvent>() { @Override public boolean apply(GridEvent e) { assert e != null; return !forAll(nodes, not(nodeForNodeId(e.node().id()))); } }; }
GridUuid id = e.id(); String name = e.name(); UUID nid = e.node().id();
GridUuid id = e.id(); String name = e.name(); UUID nid = e.node().id();