示例#1
0
        private void ExecuteSpecialCommandStatement(RequestExecutionContext context, RequestExecutionBuffer buffer)
        {
            switch (context.ParsedRequest.SpecialCommand.CommandType)
            {
            case ParsedRequest.SpecialCommandData.SpecialCommandType.Defragment:
                context.AttachResponseHeaders(new DataResponse(0, "Defragmentation completed"));
                m_storageDriver.Compact(CompactionOptions.FullReindex);
                break;

            default:
                throw new ArgumentOutOfRangeException("context", context.ParsedRequest.SpecialCommand.CommandType, "Invalid special command");
            }
        }