protected override BinaryRequest CreateRequest()
        {
            var request = new BinaryRequest(Allocator, operation)
            {
                Key = Key,
                Cas = Cas
            };

            return(request);
        }
Example #2
0
        protected override BinaryRequest CreateRequest()
        {
            var request = new BinaryRequest(Allocator, OpCode.Stat);

            if (!String.IsNullOrEmpty(type))
            {
                request.Key = EncodeKey(type);
            }

            return(request);
        }
		protected override BinaryRequest CreateRequest()
		{
			var request = new BinaryRequest(Allocator, operation, ExtraLength)
			{
				Key = Key,
				Cas = Cas
			};

			// store expiration in Extra
			var extra = request.Extra;
			NetworkOrderConverter.EncodeUInt32(Expires, extra.Array, extra.Offset);

			return request;
		}
        protected override BinaryRequest CreateRequest()
        {
            var request = new BinaryRequest(Allocator, OpCode.Touch, ExtraLength)
            {
                Key = Key,
                Cas = Cas
            };

            // store expiration in Extra
            var extra = request.Extra;

            NetworkOrderConverter.EncodeUInt32(Expires, extra.Array, extra.Offset);

            return(request);
        }
Example #5
0
        protected override BinaryRequest CreateRequest()
        {
            var request = new BinaryRequest(Allocator, operations[(int)Mode], ExtraLength)
            {
                Key = Key, Cas = Cas
            };

            // store the extra values
            var extra  = request.Extra.Array;
            var offset = request.Extra.Offset;

            NetworkOrderConverter.EncodeUInt64(Delta, extra, offset);
            NetworkOrderConverter.EncodeUInt64(DefaultValue, extra, offset + 8);
            NetworkOrderConverter.EncodeUInt32(Expires, extra, offset + 16);

            return(request);
        }
        protected override BinaryRequest CreateRequest()
        {
            var request = new BinaryRequest(Allocator, GetOpCode(Mode), ExtraLength)
            {
                Key  = Key,
                Cas  = Cas,
                Data = Value.Data.AsArraySegment()
            };

            var extra       = request.Extra;
            var extraArray  = extra.Array;
            var extraOffset = extra.Offset;

            Debug.Assert(extraArray != null);

            // store the extra values
            NetworkOrderConverter.EncodeUInt32(Value.Flags, extraArray, extraOffset);
            NetworkOrderConverter.EncodeUInt32(Expires, extraArray, extraOffset + 4);

            return(request);
        }