public static RequestParameters DecodeRequest(ClientMessage clientMessage)
        {
            using var iterator = clientMessage.GetEnumerator();
            var request = new RequestParameters();

            iterator.Take(); // empty initial frame
            request.Proxies = EntryListCodec.Decode(iterator, StringCodec.Decode, StringCodec.Decode);
            return(request);
        }
Example #2
0
        public static ResponseParameters DecodeResponse(ClientMessage clientMessage)
        {
            using var iterator = clientMessage.GetEnumerator();
            var response = new ResponseParameters();

            iterator.Take(); // empty initial frame
            response.Response = EntryListCodec.Decode(iterator, DataCodec.Decode, DataCodec.Decode);
            return(response);
        }
        public static Hazelcast.Protocol.Models.AnchorDataListHolder Decode(IEnumerator <Frame> iterator)
        {
            // begin frame
            iterator.Take();
            var anchorPageList = ListIntegerCodec.Decode(iterator);
            var anchorDataList = EntryListCodec.Decode(iterator, DataCodec.Decode, DataCodec.Decode);

            iterator.SkipToStructEnd();
            return(new Hazelcast.Protocol.Models.AnchorDataListHolder(anchorPageList, anchorDataList));
        }
Example #4
0
        public static ResponseParameters DecodeResponse(ClientMessage clientMessage)
        {
            using var iterator = clientMessage.GetEnumerator();
            var response = new ResponseParameters();

            iterator.Take(); // empty initial frame
            response.NamePartitionSequenceList = EntryListCodec.Decode(iterator, StringCodec.Decode, EntryListIntegerLongCodec.Decode);
            response.PartitionUuidList         = EntryListIntegerUUIDCodec.Decode(iterator);
            return(response);
        }
        public static ResponseParameters DecodeResponse(ClientMessage clientMessage)
        {
            var iterator = clientMessage.GetIterator();
            var response = new ResponseParameters();

            //empty initial frame
            iterator.Next();
            response.Response       = EntryListCodec.Decode(iterator, DataCodec.Decode, DataCodec.Decode);
            response.AnchorDataList = AnchorDataListHolderCodec.Decode(iterator);
            return(response);
        }
Example #6
0
        public static ResponseParameters DecodeResponse(ClientMessage clientMessage)
        {
            var iterator = clientMessage.GetIterator();
            var response = new ResponseParameters();

            //empty initial frame
            iterator.Next();
            response.IterationPointers = EntryListIntegerIntegerCodec.Decode(iterator);
            response.Entries           = EntryListCodec.Decode(iterator, DataCodec.Decode, DataCodec.Decode);
            return(response);
        }
        public static Hazelcast.Client.Protocol.AnchorDataListHolder Decode(FrameIterator iterator)
        {
            // begin frame
            iterator.Next();

            var anchorPageList = ListIntegerCodec.Decode(iterator);
            var anchorDataList = EntryListCodec.Decode(iterator, DataCodec.Decode, DataCodec.Decode);

            CodecUtil.FastForwardToEndFrame(iterator);

            return(new Hazelcast.Client.Protocol.AnchorDataListHolder(anchorPageList, anchorDataList));
        }
Example #8
0
        public static RequestParameters DecodeRequest(ClientMessage clientMessage)
        {
            using var iterator = clientMessage.GetEnumerator();
            var request      = new RequestParameters();
            var initialFrame = iterator.Take();

            if (initialFrame.Bytes.Length >= RequestTriggerMapLoaderFieldOffset + BytesExtensions.SizeOfBool)
            {
                request.TriggerMapLoader         = initialFrame.Bytes.ReadBoolL(RequestTriggerMapLoaderFieldOffset);
                request.IsTriggerMapLoaderExists = true;
            }
            else
            {
                request.IsTriggerMapLoaderExists = false;
            }
            request.Name    = StringCodec.Decode(iterator);
            request.Entries = EntryListCodec.Decode(iterator, DataCodec.Decode, DataCodec.Decode);
            return(request);
        }