Bend.LayerWriteGroup.addCommand C# (CSharp) Метод

addCommand() приватный Метод

private addCommand ( LogCommands cmd, byte cmddata ) : void
cmd LogCommands
cmddata byte
Результат void
        private void addCommand(LogCommands cmd, byte[] cmddata)
        {
            if (this.type == WriteGroupType.DISK_INCREMENTAL) {
                // if we are allowed to add each write to the disk log, then do it now
                mylayer.logwriter.addCommand(cmd, cmddata, out this.last_logwaitnumber);
            } else if (this.type == WriteGroupType.DISK_ATOMIC_FLUSH) {
                // add it to our pending list of commands to flush at the end...
                pending_cmds.Add(new LogCmd(cmd, cmddata));
            } else if (this.type == WriteGroupType.MEMORY_ONLY) {
                // we don't need to add to the log at all, but it still needs to be pushed
                // through the LogWriter so it can be applied to the working segment
                mylayer.logwriter.addCommand_NoLog(cmd, cmddata);
            } else if (this.type == WriteGroupType.DISK_ATOMIC_NOFLUSH) {
                // add it to our pending list of commands to flush at the end...
                pending_cmds.Add(new LogCmd(cmd, cmddata));
            } else {
                throw new Exception("unknown write group type in addCommand() " + type.ToString());
            }
        }