// // 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); }
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; }
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)); }
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; }
public void FlushDb() { var command = new FlushCommand(false); command.Execute(); }
public void FlushAll() { var command = new FlushCommand(true); command.Execute(); }
public CommandResult Flush(FlushCommand flushCommand) { string result = connection.Post(flushCommand); return(Serializer.ToCommandResult(result)); }
public virtual Response processFlushCommand(FlushCommand command) { return(null); }