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));
        }
        public static Hazelcast.Client.DistributedObjectInfo Decode(FrameIterator iterator)
        {
            // begin frame
            iterator.Next();

            var serviceName = StringCodec.Decode(iterator);
            var name        = StringCodec.Decode(iterator);

            CodecUtil.FastForwardToEndFrame(iterator);

            return(new Hazelcast.Client.DistributedObjectInfo(serviceName, name));
        }
        public static Hazelcast.IO.Address Decode(FrameIterator iterator)
        {
            // begin frame
            iterator.Next();

            var initialFrame = iterator.Next();
            var port         = DecodeInt(initialFrame.Content, PortFieldOffset);

            var host = StringCodec.Decode(iterator);

            CodecUtil.FastForwardToEndFrame(iterator);

            return(CustomTypeFactory.CreateAddress(host, port));
        }
Пример #4
0
        public static Hazelcast.Config.BitmapIndexOptions Decode(FrameIterator iterator)
        {
            // begin frame
            iterator.Next();

            var initialFrame            = iterator.Next();
            var uniqueKeyTransformation = DecodeInt(initialFrame.Content, UniqueKeyTransformationFieldOffset);

            var uniqueKey = StringCodec.Decode(iterator);

            CodecUtil.FastForwardToEndFrame(iterator);

            return(CustomTypeFactory.CreateBitmapIndexOptions(uniqueKey, uniqueKeyTransformation));
        }
Пример #5
0
        public static Hazelcast.Core.MemberVersion Decode(FrameIterator iterator)
        {
            // begin frame
            iterator.Next();

            var initialFrame = iterator.Next();
            var major        = DecodeByte(initialFrame.Content, MajorFieldOffset);
            var minor        = DecodeByte(initialFrame.Content, MinorFieldOffset);
            var patch        = DecodeByte(initialFrame.Content, PatchFieldOffset);

            CodecUtil.FastForwardToEndFrame(iterator);

            return(new Hazelcast.Core.MemberVersion(major, minor, patch));
        }
        public static Hazelcast.Util.StackTraceElement Decode(FrameIterator iterator)
        {
            // begin frame
            iterator.Next();

            var initialFrame = iterator.Next();
            var lineNumber   = DecodeInt(initialFrame.Content, LineNumberFieldOffset);

            var className  = StringCodec.Decode(iterator);
            var methodName = StringCodec.Decode(iterator);
            var fileName   = CodecUtil.DecodeNullable(iterator, StringCodec.Decode);

            CodecUtil.FastForwardToEndFrame(iterator);

            return(new Hazelcast.Util.StackTraceElement(className, methodName, fileName, lineNumber));
        }
Пример #7
0
        public static Hazelcast.Client.Protocol.ErrorHolder Decode(FrameIterator iterator)
        {
            // begin frame
            iterator.Next();

            var initialFrame = iterator.Next();
            var errorCode    = DecodeInt(initialFrame.Content, ErrorCodeFieldOffset);

            var className          = StringCodec.Decode(iterator);
            var message            = CodecUtil.DecodeNullable(iterator, StringCodec.Decode);
            var stackTraceElements = ListMultiFrameCodec.Decode(iterator, StackTraceElementCodec.Decode);

            CodecUtil.FastForwardToEndFrame(iterator);

            return(new Hazelcast.Client.Protocol.ErrorHolder(errorCode, className, message, stackTraceElements));
        }
        public static Hazelcast.Config.IndexConfig Decode(FrameIterator iterator)
        {
            // begin frame
            iterator.Next();

            var initialFrame = iterator.Next();
            var type         = DecodeInt(initialFrame.Content, TypeFieldOffset);

            var name               = CodecUtil.DecodeNullable(iterator, StringCodec.Decode);
            var attributes         = ListMultiFrameCodec.Decode(iterator, StringCodec.Decode);
            var bitmapIndexOptions = CodecUtil.DecodeNullable(iterator, BitmapIndexOptionsCodec.Decode);

            CodecUtil.FastForwardToEndFrame(iterator);

            return(CustomTypeFactory.CreateIndexConfig(name, type, attributes, bitmapIndexOptions));
        }
Пример #9
0
        public static Hazelcast.Core.MemberInfo Decode(FrameIterator iterator)
        {
            // begin frame
            iterator.Next();

            var initialFrame = iterator.Next();
            var uuid         = DecodeGuid(initialFrame.Content, UuidFieldOffset);
            var liteMember   = DecodeBool(initialFrame.Content, LiteMemberFieldOffset);

            var address    = AddressCodec.Decode(iterator);
            var attributes = MapCodec.Decode(iterator, StringCodec.Decode, StringCodec.Decode);
            var version    = MemberVersionCodec.Decode(iterator);

            CodecUtil.FastForwardToEndFrame(iterator);

            return(new Hazelcast.Core.MemberInfo(address, uuid, attributes, liteMember, version));
        }
        public static Hazelcast.Client.Protocol.PagingPredicateHolder Decode(FrameIterator iterator)
        {
            // begin frame
            iterator.Next();

            var initialFrame    = iterator.Next();
            var pageSize        = DecodeInt(initialFrame.Content, PageSizeFieldOffset);
            var page            = DecodeInt(initialFrame.Content, PageFieldOffset);
            var iterationTypeId = DecodeByte(initialFrame.Content, IterationTypeIdFieldOffset);

            var anchorDataListHolder = AnchorDataListHolderCodec.Decode(iterator);
            var predicateData        = CodecUtil.DecodeNullable(iterator, DataCodec.Decode);
            var comparatorData       = CodecUtil.DecodeNullable(iterator, DataCodec.Decode);
            var partitionKeyData     = CodecUtil.DecodeNullable(iterator, DataCodec.Decode);

            CodecUtil.FastForwardToEndFrame(iterator);

            return(new Hazelcast.Client.Protocol.PagingPredicateHolder(anchorDataListHolder, predicateData, comparatorData, pageSize, page, iterationTypeId, partitionKeyData));
        }
Пример #11
0
        public static Hazelcast.Map.SimpleEntryView <IData, IData> Decode(FrameIterator iterator)
        {
            // begin frame
            iterator.Next();

            var initialFrame   = iterator.Next();
            var cost           = DecodeLong(initialFrame.Content, CostFieldOffset);
            var creationTime   = DecodeLong(initialFrame.Content, CreationTimeFieldOffset);
            var expirationTime = DecodeLong(initialFrame.Content, ExpirationTimeFieldOffset);
            var hits           = DecodeLong(initialFrame.Content, HitsFieldOffset);
            var lastAccessTime = DecodeLong(initialFrame.Content, LastAccessTimeFieldOffset);
            var lastStoredTime = DecodeLong(initialFrame.Content, LastStoredTimeFieldOffset);
            var lastUpdateTime = DecodeLong(initialFrame.Content, LastUpdateTimeFieldOffset);
            var version        = DecodeLong(initialFrame.Content, VersionFieldOffset);
            var ttl            = DecodeLong(initialFrame.Content, TtlFieldOffset);
            var maxIdle        = DecodeLong(initialFrame.Content, MaxIdleFieldOffset);

            var key    = DataCodec.Decode(iterator);
            var @value = DataCodec.Decode(iterator);

            CodecUtil.FastForwardToEndFrame(iterator);

            return(CustomTypeFactory.CreateSimpleEntryView(key, @value, cost, creationTime, expirationTime, hits, lastAccessTime, lastStoredTime, lastUpdateTime, version, ttl, maxIdle));
        }