public static void Encode(ClientMessage clientMessage, Hazelcast.Client.Protocol.AnchorDataListHolder anchorDataListHolder)
        {
            clientMessage.Add(BeginFrame.Copy());

            ListIntegerCodec.Encode(clientMessage, anchorDataListHolder.AnchorPageList);
            EntryListCodec.Encode(clientMessage, anchorDataListHolder.AnchorDataList, DataCodec.Encode, DataCodec.EncodeNullable);

            clientMessage.Add(EndFrame.Copy());
        }
 public PagingPredicateHolder(AnchorDataListHolder anchorDataListHolder, IData predicateData, IData comparatorData,
                              int pageSize, int page, byte iterationTypeId, IData partitionKeyData)
 {
     AnchorDataListHolder = anchorDataListHolder;
     PredicateData        = predicateData;
     ComparatorData       = comparatorData;
     PageSize             = pageSize;
     Page             = page;
     IterationTypeId  = iterationTypeId;
     PartitionKeyData = partitionKeyData;
 }
        private static PagingPredicateHolder BuildHolder(ISerializationService serializationService,
                                                         PagingPredicate pagingPredicate, IData partitionKeyData)
        {
            var anchorList     = pagingPredicate.AnchorList;
            var anchorDataList = new List <KeyValuePair <IData, IData> >(anchorList.Count);
            var pageList       = new List <int>(anchorList.Count);

            foreach (var pair in anchorList)
            {
                pageList.Add(pair.Key);
                var anchorEntry = pair.Value;
                anchorDataList.Add(new KeyValuePair <IData, IData>(serializationService.ToData(anchorEntry.Key),
                                                                   serializationService.ToData(anchorEntry.Value)));
            }
            var anchorDataListHolder = new AnchorDataListHolder(pageList, anchorDataList);
            var predicateData        = serializationService.ToData(pagingPredicate.Predicate);
            var comparatorData       = serializationService.ToData(pagingPredicate.Comparer);

            return(new PagingPredicateHolder(anchorDataListHolder, predicateData, comparatorData, pagingPredicate.PageSize,
                                             pagingPredicate.Page, (byte)pagingPredicate.IterationType, partitionKeyData));
        }