/**
   * @param cctx Context.
   * @param type Query type.
   * @param clsName Class name.
   * @param clause Clause.
   * @param filter Scan filter.
   * @param incMeta Include metadata flag.
   * @param keepPortable Keep portable flag.
   * @param prjPred Cache projection filter.
   */
  public GridCacheQueryAdapter(
      GridCacheContext<?, ?> cctx,
      GridCacheQueryType type,
      @Nullable GridPredicate<GridCacheEntry<Object, Object>> prjPred,
      @Nullable String clsName,
      @Nullable String clause,
      @Nullable GridBiPredicate<Object, Object> filter,
      boolean incMeta,
      boolean keepPortable) {
    assert cctx != null;
    assert type != null;

    this.cctx = cctx;
    this.type = type;
    this.clsName = clsName;
    this.clause = clause;
    this.prjPred = prjPred;
    this.filter = filter;
    this.incMeta = incMeta;
    this.keepPortable = keepPortable;

    log = cctx.logger(getClass());

    pageSize = DFLT_PAGE_SIZE;
    timeout = 0;
    keepAll = true;
    incBackups = false;
    dedup = false;
    prj = null;

    metrics = new GridCacheQueryMetricsAdapter();
  }
  /**
   * @param ctx Cache context.
   * @param topic Topic for ordered messages.
   * @param prjPred Projection predicate.
   */
  GridCacheContinuousQueryAdapter(
      GridCacheContext<K, V> ctx,
      Object topic,
      @Nullable GridPredicate<GridCacheEntry<K, V>> prjPred) {
    assert ctx != null;
    assert topic != null;

    this.ctx = ctx;
    this.topic = topic;
    this.prjPred = prjPred;

    log = ctx.logger(getClass());
  }