/** {@inheritDoc} */ @Override public void close() throws IgniteCheckedException { ((GridCloseableIterator)it).close(); } }
/** {@inheritDoc} */ @Override public boolean equals(Object obj) { return obj instanceof Collection && GridFunc.eqNotOrdered(this, (Collection)obj); } }
/** * @param c Cursor. * @return Number of elements. * @throws IgniteCheckedException If failed. */ private static int size(GridCursor<?> c) throws IgniteCheckedException { int cnt = 0; while(c.next()) cnt++; return cnt; }
/** * Shortcut method that creates an instance of {@link GridClosureException}. * * @param e Exception to wrap. * @return Newly created instance of {@link GridClosureException}. */ public static GridClosureException wrap(Throwable e) { return new GridClosureException(e); }
/** {@inheritDoc} */ @Override public Object next() { return it.next(); } }
/** * Tests whether or not given metadata is set. * * @param key key of the metadata to test. * @return Whether or not given metadata is set. */ public boolean hasMeta(int key) { return meta(key) != null; }
/** * Delegates to {@link #apply()} method. * <p> * {@inheritDoc} */ @Override public final void run() { apply(); } }
/** {@inheritDoc} */ @Override public T next() { return impl.next(); }
/** * Creates predicates that evaluates to {@code true} for each node in given collection. * Note that if collection is empty the result predicate will always evaluate to {@code false}. * Implementation simply creates {@link GridNodePredicate} instance. * * @param nodes Collection of nodes. If none provided - result predicate will always * return {@code false}. * @return Predicates that evaluates to {@code true} for each node in given collection. */ public static IgnitePredicate<ClusterNode> nodeForNodes(ClusterNode... nodes) { return new GridNodePredicate(nodes); }
/** {@inheritDoc} */ @Override public Object clone() { return super.clone(); } }
/** * Unwraps the original {@link Throwable} instance. * * @return The original {@link Throwable} instance. */ public Throwable unwrap() { return getCause(); } }
/** * @param rootNode Root tree node. * @param a Output. */ public void print(T rootNode, Appendable a) throws IOException { printTree(rootNode, "", true, a); }
@Override protected void onClose() throws IgniteCheckedException { if (curIt != null) curIt.close(); } };
@Override public T apply(IgniteInternalFuture<IgniteInternalTx> f) { throw new GridClosureException(ex); } });
/** {@inheritDoc} */ @Override public boolean equals(Object obj) { return obj instanceof Collection && GridFunc.eqNotOrdered(this, (Collection<?>)obj); } }
@Override protected void onClose() throws IgniteCheckedException { if (curIt != null) curIt.close(); } };
/** * Closes iterator. * * @throws IgniteCheckedException If failed. */ public void close() throws IgniteCheckedException { it.close(); } }
/** {@inheritDoc} */ @Override protected void onClose() throws IgniteCheckedException { if (curIt != null) curIt.close(); } }