/** {@inheritDoc} */
  @Override
  protected Collection<E> pollEvictedBatch0() {
    E res = pollEvictedInternal();

    if (res == null) return Collections.emptyList();

    return Collections.singleton(res);
  }
  /**
   * Creates node predicate that evaluates to {@code true} for all provided nodes. Implementation
   * will make a defensive copy.
   *
   * @param nodes Optional grid nodes. If none provided - predicate will always return {@code
   *     false}.
   */
  public GridNodePredicate(@Nullable GridNode... nodes) {
    if (F.isEmpty(nodes)) ids = Collections.emptySet();
    else if (nodes.length == 1) ids = Collections.singleton(nodes[0].id());
    else {
      ids = new HashSet<>(nodes.length);

      for (GridNode n : nodes) ids.add(n.id());
    }
  }
  /**
   * Creates node predicate that evaluates to {@code true} for all provided node IDs. Implementation
   * will make a defensive copy.
   *
   * @param ids Optional node IDs. If none provided - predicate will always return {@code false}.
   */
  public GridNodePredicate(@Nullable UUID... ids) {
    if (F.isEmpty(ids)) this.ids = Collections.emptySet();
    else if (ids.length == 1) this.ids = Collections.singleton(ids[0]);
    else {
      this.ids = new HashSet<>(ids.length);

      Collections.addAll(this.ids, ids);
    }
  }
    private void init() {
      ClusterNode node = nodes.poll();

      GridCacheQueryFutureAdapter<?, ?, R> fut0 =
          (GridCacheQueryFutureAdapter<?, ?, R>)
              (node.isLocal()
                  ? qryMgr.queryLocal(bean)
                  : qryMgr.queryDistributed(bean, Collections.singleton(node)));

      fut0.listen(
          new IgniteInClosure<IgniteInternalFuture<Collection<R>>>() {
            @Override
            public void apply(IgniteInternalFuture<Collection<R>> fut) {
              try {
                onDone(fut.get());
              } catch (IgniteCheckedException e) {
                if (F.isEmpty(nodes)) onDone(e);
                else init();
              }
            }
          });

      fut = fut0;
    }
 @NotNull
 public static Future<Void> asyncDelete(@NotNull File file) {
   return asyncDelete(Collections.singleton(file));
 }
 /**
  * Creates node predicate that evaluates to {@code true} for all provided node IDs. Implementation
  * will make a defensive copy.
  *
  * @param ids Optional node IDs. If none provided - predicate will always return {@code false}.
  */
 public GridNodePredicate(@Nullable Collection<UUID> ids) {
   this.ids =
       F.isEmpty(ids)
           ? Collections.<UUID>emptySet()
           : ids.size() == 1 ? Collections.singleton(F.first(ids)) : new HashSet<>(ids);
 }