public static ClientMessage EncodeRequest(string name, Hazelcast.Client.Protocol.PagingPredicateHolder predicate) { var clientMessage = CreateForEncode(); clientMessage.IsRetryable = true; clientMessage.OperationName = "Map.EntriesWithPagingPredicate"; var initialFrame = new Frame(new byte[RequestInitialFrameSize], UnfragmentedMessage); EncodeInt(initialFrame.Content, TypeFieldOffset, RequestMessageType); EncodeInt(initialFrame.Content, PartitionIdFieldOffset, -1); clientMessage.Add(initialFrame); StringCodec.Encode(clientMessage, name); PagingPredicateHolderCodec.Encode(clientMessage, predicate); return(clientMessage); }
public static void Encode(ClientMessage clientMessage, Hazelcast.Client.Protocol.PagingPredicateHolder pagingPredicateHolder) { clientMessage.Add(BeginFrame.Copy()); var initialFrame = new Frame(new byte[InitialFrameSize]); EncodeInt(initialFrame.Content, PageSizeFieldOffset, pagingPredicateHolder.PageSize); EncodeInt(initialFrame.Content, PageFieldOffset, pagingPredicateHolder.Page); EncodeByte(initialFrame.Content, IterationTypeIdFieldOffset, pagingPredicateHolder.IterationTypeId); clientMessage.Add(initialFrame); AnchorDataListHolderCodec.Encode(clientMessage, pagingPredicateHolder.AnchorDataListHolder); CodecUtil.EncodeNullable(clientMessage, pagingPredicateHolder.PredicateData, DataCodec.Encode); CodecUtil.EncodeNullable(clientMessage, pagingPredicateHolder.ComparatorData, DataCodec.Encode); CodecUtil.EncodeNullable(clientMessage, pagingPredicateHolder.PartitionKeyData, DataCodec.Encode); clientMessage.Add(EndFrame.Copy()); }