/**
  * @param res Query result.
  * @param err Error or {@code null} if query executed successfully.
  * @param startTime Start time.
  * @param duration Duration.
  */
 public void onExecuted(Object res, Throwable err, long startTime, long duration) {
   GridQueryProcessor.onExecuted(cctx, metrics, res, err, startTime, duration, log);
 }
 /** @throws IgniteCheckedException If query is invalid. */
 public void validate() throws IgniteCheckedException {
   if ((type != SCAN && type != SET) && !GridQueryProcessor.isEnabled(cctx.config()))
     throw new IgniteCheckedException("Indexing is disabled for cache: " + cctx.cache().name());
 }