Commit 927bb77c authored by zhujiashun's avatar zhujiashun

redis_server_protocol: refine comment

parent 26ff9d47
...@@ -219,15 +219,15 @@ class RedisCommandHandler; ...@@ -219,15 +219,15 @@ class RedisCommandHandler;
// to enable redis support. // to enable redis support.
class RedisService { class RedisService {
public: public:
typedef std::unordered_map<std::string, std::shared_ptr<RedisCommandHandler>> CommandMap;
virtual ~RedisService() {} virtual ~RedisService() {}
// Call this function to register `handler` that can handle command `name`. // Call this function to register `handler` that can handle command `name`.
bool AddCommandHandler(const std::string& name, RedisCommandHandler* handler); bool AddCommandHandler(const std::string& name, RedisCommandHandler* handler);
private: // This function should be touched by user and used by brpc deverloper only.
typedef std::unordered_map<std::string, std::shared_ptr<RedisCommandHandler>> CommandMap;
friend ParseResult ParseRedisReply(butil::IOBuf*, Socket*, bool, const void*);
void CloneCommandMap(CommandMap* map); void CloneCommandMap(CommandMap* map);
private:
CommandMap _command_map; CommandMap _command_map;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment