Skip to content

Commit

Permalink
feature: support quit command (OpenAtomFoundation#1155)
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelai authored Apr 6, 2022
1 parent 6dabfd1 commit fbbc4a3
Show file tree
Hide file tree
Showing 5 changed files with 454 additions and 274 deletions.
15 changes: 15 additions & 0 deletions include/pika_admin.h
Original file line number Diff line number Diff line change
Expand Up @@ -521,4 +521,19 @@ class DummyCmd : public Cmd {
virtual void DoInitial() override;
};

class QuitCmd : public Cmd {
public:
QuitCmd(const std::string& name, int arity, uint16_t flag)
: Cmd(name, arity, flag) {}
virtual void Do(std::shared_ptr<Partition> partition = nullptr);
virtual void Split(std::shared_ptr<Partition> partition, const HintKeys& hint_keys) {};
virtual void Merge() {};
virtual Cmd* Clone() override {
return new QuitCmd(*this);
}

private:
virtual void DoInitial() override;
};

#endif // PIKA_ADMIN_H_
1 change: 1 addition & 0 deletions include/pika_command.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ const std::string kCmdNameTcmalloc = "tcmalloc";
#endif
const std::string kCmdNamePKPatternMatchDel = "pkpatternmatchdel";
const std::string kCmdDummy = "dummy";
const std::string kCmdNameQuit = "quit";

//Kv
const std::string kCmdNameSet = "set";
Expand Down
Loading

0 comments on commit fbbc4a3

Please sign in to comment.