Esempio n. 1
0
        public override List <IPrimaryRelayMessageQuery> SplitQuery(int numClustersInGroup)
        {
            PagedIndexQuery query;
            List <IPrimaryRelayMessageQuery> queryList = new List <IPrimaryRelayMessageQuery>();
            Dictionary <int, Triple <List <byte[]>, List <int>, Dictionary <byte[], IndexIdParams> > > clusterParamsMapping;

            IndexCacheUtils.SplitIndexIdsByCluster(IndexIdList, PrimaryIdList, IndexIdParamsMapping, numClustersInGroup, out clusterParamsMapping);

            ClientSidePaging        = (numClustersInGroup > 1 && IndexIdList.Count > 1 && clusterParamsMapping.Count > 1);
            this.numClustersInGroup = numClustersInGroup;

            foreach (KeyValuePair <int, Triple <List <byte[]>, List <int>, Dictionary <byte[], IndexIdParams> > > clusterParam in clusterParamsMapping)
            {
                query = new PagedIndexQuery(this)
                {
                    PrimaryId            = clusterParam.Key,
                    IndexIdList          = clusterParam.Value.First,
                    PrimaryIdList        = clusterParam.Value.Second,
                    IndexIdParamsMapping = clusterParam.Value.Third,
                };
                queryList.Add(query);
            }
            return(queryList);
        }
Esempio n. 2
0
 public PagedIndexQuery(PagedIndexQuery query)
     : base(query)
 {
     PageNum  = query.PageNum;
     PageSize = query.PageSize;
 }
 // copy ctor
 public VirtualPagedIndexQuery(PagedIndexQuery query)
     : base(query)
 {
 }