コード例 #1
0
        //
        // Write the booleans that this object uses to a BooleanStream
        //
        public override int TightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs)
        {
            FlushCommand info = (FlushCommand)o;

            int rc = base.TightMarshal1(wireFormat, info, bs);

            return(rc + 0);
        }
コード例 #2
0
        public void CreateFlushCommand(Opcode type, bool noreply)
        {
            int delay = 0;

            if (_requestHeader.ExtraLength > 0)
            {
                delay = ((_rawData[0] << 24) | (_rawData[1] << 16) | (_rawData[2] << 8) | _rawData[3]);
            }
            _command         = new FlushCommand(type, delay);
            _command.NoReply = noreply;
        }
コード例 #3
0
        public static byte[] BuildFlushResponse(FlushCommand command)
        {
            BinaryResponseStatus status = BinaryResponseStatus.no_error;

            if (command.OperationResult.ReturnResult != Result.SUCCESS)
            {
                status = BinaryResponseStatus.invalid_arguments;
            }
            else
            {
                if (command.NoReply == true)
                {
                    return(null);
                }
            }
            return(BuildResposne(command.Opcode, status, command.Opaque, 0, null, null, null));
        }
コード例 #4
0
        private void CreateFlushCommand(string arguments)
        {
            int  delay   = 0;
            bool noreply = false;

            string[] argumentsArray;
            if (string.IsNullOrEmpty(arguments))
            {
                delay = 0;
            }
            else
            {
                argumentsArray = arguments.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
                if (argumentsArray.Length > 2)
                {
                    CreateInvalidCommand();
                    return;
                }

                try
                {
                    delay = int.Parse(argumentsArray[0]);
                    if (argumentsArray.Length > 1 && argumentsArray[1] == "noreply")
                    {
                        noreply = true;
                    }
                }
                catch (Exception e)
                {
                    CreateInvalidCommand("CLIENT_ERROR bad command line format");
                    return;
                }
            }

            _command         = new FlushCommand(Opcode.Flush, delay);
            _command.NoReply = noreply;
            this.State       = ParserState.ReadyToDispatch;
        }
コード例 #5
0
ファイル: RedisClient.cs プロジェクト: yonglehou/Symbiote
        public void FlushDb()
        {
            var command = new FlushCommand(false);

            command.Execute();
        }
コード例 #6
0
ファイル: RedisClient.cs プロジェクト: yonglehou/Symbiote
        public void FlushAll()
        {
            var command = new FlushCommand(true);

            command.Execute();
        }
コード例 #7
0
        public CommandResult Flush(FlushCommand flushCommand)
        {
            string result = connection.Post(flushCommand);

            return(Serializer.ToCommandResult(result));
        }
コード例 #8
0
 public virtual Response processFlushCommand(FlushCommand command)
 {
     return(null);
 }