prj = prj.forCache(ctx.name());
if (prj.nodes().isEmpty())
throw new GridTopologyException("Failed to execute query (projection is empty): " + this);
GridCacheMode mode = ctx.config().getCacheMode();
if (mode == LOCAL || mode == REPLICATED) {
Collection<GridNode> nodes = prj.nodes();
GridNode node = nodes.contains(ctx.localNode()) ? ctx.localNode() : F.rand(nodes);