@@ -623,6 +623,30 @@ namespace cpp_redis {
623623 return *this ;
624624 }
625625
626+ client&
627+ client::bzpopmin (const std::vector<std::string>& keys, int timeout, const reply_callback_t & reply_callback) {
628+ std::vector<std::string> cmd = {" BZPOPMIN" };
629+ cmd.insert (cmd.end (), keys.begin (), keys.end ());
630+ cmd.push_back (std::to_string (timeout));
631+ send (cmd, reply_callback);
632+ return *this ;
633+ }
634+
635+ client&
636+ client::bzpopmax (const std::vector<std::string>& keys, int timeout, const reply_callback_t & reply_callback) {
637+ std::vector<std::string> cmd = {" BZPOPMAX" };
638+ cmd.insert (cmd.end (), keys.begin (), keys.end ());
639+ cmd.push_back (std::to_string (timeout));
640+ send (cmd, reply_callback);
641+ return *this ;
642+ }
643+
644+ client&
645+ client::client_id (const reply_callback_t & reply_callback) {
646+ send ({" CLIENT" , " ID" }, reply_callback);
647+ return *this ;
648+ }
649+
626650 client &
627651 client::client_list (const reply_callback_t &reply_callback) {
628652 send ({" CLIENT" , " LIST" }, reply_callback);
@@ -653,6 +677,21 @@ namespace cpp_redis {
653677 return *this ;
654678 }
655679
680+ client&
681+ client::client_unblock (int id, const reply_callback_t & reply_callback) {
682+ send ({" CLIENT" , " UNBLOCK" , std::to_string (id)}, reply_callback);
683+ return *this ;
684+ }
685+
686+ client&
687+ client::client_unblock (int id, bool witherror, const reply_callback_t & reply_callback) {
688+ if (witherror)
689+ send ({" CLIENT" , " UNBLOCK" , std::to_string (id), " ERROR" }, reply_callback);
690+ else
691+ send ({" CLIENT" , " UNBLOCK" , std::to_string (id)}, reply_callback);
692+ return *this ;
693+ }
694+
656695 client &
657696 client::cluster_addslots (const std::vector<std::string> &p_slots, const reply_callback_t &reply_callback) {
658697 std::vector<std::string> cmd = {" CLUSTER" , " ADDSLOTS" };
@@ -2529,6 +2568,18 @@ namespace cpp_redis {
25292568 return *this ;
25302569 }
25312570
2571+ client&
2572+ client::zpopmin (const std::string& key, int count, const reply_callback_t & reply_callback) {
2573+ send ({" ZPOPMIN" , key, std::to_string (count)}, reply_callback);
2574+ return *this ;
2575+ }
2576+
2577+ client&
2578+ client::zpopmax (const std::string& key, int count, const reply_callback_t & reply_callback) {
2579+ send ({" ZPOPMAX" , key, std::to_string (count)}, reply_callback);
2580+ return *this ;
2581+ }
2582+
25322583 client &
25332584 client::zrange (const std::string &key, int start, int stop, const reply_callback_t &reply_callback) {
25342585 send ({" ZRANGE" , key, std::to_string (start), std::to_string (stop)}, reply_callback);
@@ -3239,6 +3290,21 @@ namespace cpp_redis {
32393290 return exec_cmd ([=](const reply_callback_t &cb) -> client & { return brpoplpush (src, dst, timeout, cb); });
32403291 }
32413292
3293+ std::future<reply>
3294+ client::bzpopmin (const std::vector<std::string>& keys, int timeout) {
3295+ return exec_cmd ([=](const reply_callback_t & cb) -> client& { return bzpopmin (keys, timeout, cb); });
3296+ }
3297+
3298+ std::future<reply>
3299+ client::bzpopmax (const std::vector<std::string>& keys, int timeout) {
3300+ return exec_cmd ([=](const reply_callback_t & cb) -> client& { return bzpopmax (keys, timeout, cb); });
3301+ }
3302+
3303+ std::future<reply>
3304+ client::client_id () {
3305+ return exec_cmd ([=](const reply_callback_t & cb) -> client& { return client_id (cb); });
3306+ }
3307+
32423308 std::future<reply>
32433309 client::client_list () {
32443310 return exec_cmd ([=](const reply_callback_t &cb) -> client & { return client_list (cb); });
@@ -3264,6 +3330,11 @@ namespace cpp_redis {
32643330 return exec_cmd ([=](const reply_callback_t &cb) -> client & { return client_setname (name, cb); });
32653331 }
32663332
3333+ std::future<reply>
3334+ client::client_unblock (int id, bool witherror) {
3335+ return exec_cmd ([=](const reply_callback_t & cb) -> client& { return client_unblock (id, witherror, cb); });
3336+ }
3337+
32673338 std::future<reply>
32683339 client::cluster_addslots (const std::vector<std::string> &p_slots) {
32693340 return exec_cmd ([=](const reply_callback_t &cb) -> client & { return cluster_addslots (p_slots, cb); });
@@ -4406,6 +4477,15 @@ namespace cpp_redis {
44064477 return exec_cmd ([=](const reply_callback_t &cb) -> client & { return zlexcount (key, min, max, cb); });
44074478 }
44084479
4480+ std::future<reply>
4481+ client::zpopmin (const std::string& key, int count) {
4482+ return exec_cmd ([=](const reply_callback_t & cb) -> client& { return zpopmin (key, count, cb); });
4483+ }
4484+ std::future<reply>
4485+ client::zpopmax (const std::string& key, int count) {
4486+ return exec_cmd ([=](const reply_callback_t & cb) -> client& { return zpopmax (key, count, cb); });
4487+ }
4488+
44094489 std::future<reply>
44104490 client::zrange (const std::string &key, int start, int stop, bool withscores) {
44114491 return exec_cmd ([=](const reply_callback_t &cb) -> client & { return zrange (key, start, stop, withscores, cb); });
0 commit comments