26 #include <condition_variable> 77 #ifndef __CPP_REDIS_USE_CUSTOM_TCP_CLIENT 87 explicit client(
const std::shared_ptr<network::tcp_client_iface>& tcp_client);
101 typedef std::function<void(const std::string& host, std::size_t port, connect_state status)>
connect_callback_t;
114 const std::string& host =
"127.0.0.1",
115 std::size_t port = 6379,
116 const connect_callback_t& connect_callback =
nullptr,
117 std::uint32_t timeout_msecs = 0,
118 std::int32_t max_reconnects = 0,
119 std::uint32_t reconnect_interval_msecs = 0);
131 const std::string& name,
132 const connect_callback_t& connect_callback =
nullptr,
133 std::uint32_t timeout_msecs = 0,
134 std::int32_t max_reconnects = 0,
135 std::uint32_t reconnect_interval_msecs = 0);
147 void disconnect(
bool wait_for_removal =
false);
175 client&
send(
const std::vector<std::string>& redis_cmd,
const reply_callback_t& callback);
184 std::future<reply>
send(
const std::vector<std::string>& redis_cmd);
210 template <
class Rep,
class Period>
221 if (!
m_sync_condvar.wait_for(lock_callback, timeout, [=] { return m_callbacks_running == 0 && m_commands.empty(); })) {
271 void unprotected_send(
const std::vector<std::string>& redis_cmd,
const reply_callback_t& callback);
280 void unprotected_auth(
const std::string& password,
const reply_callback_t& reply_callback);
298 void add_sentinel(
const std::string& host, std::size_t port);
321 client&
append(
const std::string& key,
const std::string& value,
const reply_callback_t& reply_callback);
322 std::future<reply>
append(
const std::string& key,
const std::string& value);
324 client&
auth(
const std::string& password,
const reply_callback_t& reply_callback);
325 std::future<reply>
auth(
const std::string& password);
331 std::future<reply>
bgsave();
333 client&
bitcount(
const std::string& key,
const reply_callback_t& reply_callback);
334 std::future<reply>
bitcount(
const std::string& key);
336 client&
bitcount(
const std::string& key,
int start,
int end,
const reply_callback_t& reply_callback);
337 std::future<reply>
bitcount(
const std::string& key,
int start,
int end);
339 client&
bitop(
const std::string& operation,
const std::string& destkey,
const std::vector<std::string>&
keys,
const reply_callback_t& reply_callback);
340 std::future<reply>
bitop(
const std::string& operation,
const std::string& destkey,
const std::vector<std::string>& keys);
342 client&
bitpos(
const std::string& key,
int bit,
const reply_callback_t& reply_callback);
343 std::future<reply>
bitpos(
const std::string& key,
int bit);
345 client&
bitpos(
const std::string& key,
int bit,
int start,
const reply_callback_t& reply_callback);
346 std::future<reply>
bitpos(
const std::string& key,
int bit,
int start);
348 client&
bitpos(
const std::string& key,
int bit,
int start,
int end,
const reply_callback_t& reply_callback);
349 std::future<reply>
bitpos(
const std::string& key,
int bit,
int start,
int end);
351 client&
blpop(
const std::vector<std::string>& keys,
int timeout,
const reply_callback_t& reply_callback);
352 std::future<reply>
blpop(
const std::vector<std::string>& keys,
int timeout);
354 client&
brpop(
const std::vector<std::string>& keys,
int timeout,
const reply_callback_t& reply_callback);
355 std::future<reply>
brpop(
const std::vector<std::string>& keys,
int timeout);
357 client&
brpoplpush(
const std::string& src,
const std::string& dst,
int timeout,
const reply_callback_t& reply_callback);
358 std::future<reply>
brpoplpush(
const std::string& src,
const std::string& dst,
int timeout);
360 template <
typename T,
typename... Ts>
361 client&
client_kill(
const std::string& host,
int port,
const T& arg,
const Ts&... args);
363 template <
typename... Ts>
365 template <
typename T,
typename... Ts>
367 template <
typename T,
typename... Ts>
379 client&
client_reply(
const std::string& mode,
const reply_callback_t& reply_callback);
380 std::future<reply>
client_reply(
const std::string& mode);
385 client&
cluster_addslots(
const std::vector<std::string>& p_slots,
const reply_callback_t& reply_callback);
386 std::future<reply>
cluster_addslots(
const std::vector<std::string>& p_slots);
394 client&
cluster_delslots(
const std::vector<std::string>& p_slots,
const reply_callback_t& reply_callback);
395 std::future<reply>
cluster_delslots(
const std::vector<std::string>& p_slots);
415 client&
cluster_meet(
const std::string& ip,
int port,
const reply_callback_t& reply_callback);
416 std::future<reply>
cluster_meet(
const std::string& ip,
int port);
426 std::future<reply>
cluster_reset(
const std::string& mode =
"soft");
434 client&
cluster_setslot(
const std::string& slot,
const std::string& mode,
const reply_callback_t& reply_callback);
435 std::future<reply>
cluster_setslot(
const std::string& slot,
const std::string& mode);
437 client&
cluster_setslot(
const std::string& slot,
const std::string& mode,
const std::string& node_id,
const reply_callback_t& reply_callback);
438 std::future<reply>
cluster_setslot(
const std::string& slot,
const std::string& mode,
const std::string& node_id);
455 client&
command_info(
const std::vector<std::string>& command_name,
const reply_callback_t& reply_callback);
456 std::future<reply>
command_info(
const std::vector<std::string>& command_name);
458 client&
config_get(
const std::string& param,
const reply_callback_t& reply_callback);
459 std::future<reply>
config_get(
const std::string& param);
464 client&
config_set(
const std::string& param,
const std::string& val,
const reply_callback_t& reply_callback);
465 std::future<reply>
config_set(
const std::string& param,
const std::string& val);
471 std::future<reply>
dbsize();
474 std::future<reply>
debug_object(
const std::string& key);
479 client&
decr(
const std::string& key,
const reply_callback_t& reply_callback);
480 std::future<reply>
decr(
const std::string& key);
482 client&
decrby(
const std::string& key,
int val,
const reply_callback_t& reply_callback);
483 std::future<reply>
decrby(
const std::string& key,
int val);
485 client&
del(
const std::vector<std::string>& key,
const reply_callback_t& reply_callback);
486 std::future<reply>
del(
const std::vector<std::string>& key);
491 client&
dump(
const std::string& key,
const reply_callback_t& reply_callback);
492 std::future<reply>
dump(
const std::string& key);
494 client&
echo(
const std::string& msg,
const reply_callback_t& reply_callback);
495 std::future<reply>
echo(
const std::string& msg);
497 client&
eval(
const std::string& script,
int numkeys,
const std::vector<std::string>& keys,
const std::vector<std::string>& args,
const reply_callback_t& reply_callback);
498 std::future<reply>
eval(
const std::string& script,
int numkeys,
const std::vector<std::string>& keys,
const std::vector<std::string>& args);
500 client&
evalsha(
const std::string& sha1,
int numkeys,
const std::vector<std::string>& keys,
const std::vector<std::string>& args,
const reply_callback_t& reply_callback);
501 std::future<reply>
evalsha(
const std::string& sha1,
int numkeys,
const std::vector<std::string>& keys,
const std::vector<std::string>& args);
503 client&
exec(
const reply_callback_t& reply_callback);
504 std::future<reply>
exec();
506 client&
exists(
const std::vector<std::string>& keys,
const reply_callback_t& reply_callback);
507 std::future<reply>
exists(
const std::vector<std::string>& keys);
509 client&
expire(
const std::string& key,
int seconds,
const reply_callback_t& reply_callback);
510 std::future<reply>
expire(
const std::string& key,
int seconds);
512 client&
expireat(
const std::string& key,
int timestamp,
const reply_callback_t& reply_callback);
513 std::future<reply>
expireat(
const std::string& key,
int timestamp);
521 client&
geoadd(
const std::string& key,
const std::vector<std::tuple<std::string, std::string, std::string>>& long_lat_memb,
const reply_callback_t& reply_callback);
522 std::future<reply>
geoadd(
const std::string& key,
const std::vector<std::tuple<std::string, std::string, std::string>>& long_lat_memb);
524 client&
geohash(
const std::string& key,
const std::vector<std::string>& members,
const reply_callback_t& reply_callback);
525 std::future<reply>
geohash(
const std::string& key,
const std::vector<std::string>& members);
527 client&
geopos(
const std::string& key,
const std::vector<std::string>& members,
const reply_callback_t& reply_callback);
528 std::future<reply>
geopos(
const std::string& key,
const std::vector<std::string>& members);
530 client&
geodist(
const std::string& key,
const std::string& member_1,
const std::string& member_2,
const reply_callback_t& reply_callback);
531 client&
geodist(
const std::string& key,
const std::string& member_1,
const std::string& member_2,
const std::string& unit,
const reply_callback_t& reply_callback);
532 std::future<reply>
geodist(
const std::string& key,
const std::string& member_1,
const std::string& member_2,
const std::string& unit =
"m");
534 client&
get(
const std::string& key,
const reply_callback_t& reply_callback);
535 std::future<reply>
get(
const std::string& key);
537 client&
getbit(
const std::string& key,
int offset,
const reply_callback_t& reply_callback);
538 std::future<reply>
getbit(
const std::string& key,
int offset);
540 client&
getrange(
const std::string& key,
int start,
int end,
const reply_callback_t& reply_callback);
541 std::future<reply>
getrange(
const std::string& key,
int start,
int end);
543 client&
getset(
const std::string& key,
const std::string& val,
const reply_callback_t& reply_callback);
544 std::future<reply>
getset(
const std::string& key,
const std::string& val);
546 client&
hdel(
const std::string& key,
const std::vector<std::string>& fields,
const reply_callback_t& reply_callback);
547 std::future<reply>
hdel(
const std::string& key,
const std::vector<std::string>& fields);
549 client&
hexists(
const std::string& key,
const std::string& field,
const reply_callback_t& reply_callback);
550 std::future<reply>
hexists(
const std::string& key,
const std::string& field);
552 client&
hget(
const std::string& key,
const std::string& field,
const reply_callback_t& reply_callback);
553 std::future<reply>
hget(
const std::string& key,
const std::string& field);
555 client&
hgetall(
const std::string& key,
const reply_callback_t& reply_callback);
556 std::future<reply>
hgetall(
const std::string& key);
558 client&
hincrby(
const std::string& key,
const std::string& field,
int incr,
const reply_callback_t& reply_callback);
559 std::future<reply>
hincrby(
const std::string& key,
const std::string& field,
int incr);
561 client&
hincrbyfloat(
const std::string& key,
const std::string& field,
float incr,
const reply_callback_t& reply_callback);
562 std::future<reply>
hincrbyfloat(
const std::string& key,
const std::string& field,
float incr);
564 client&
hkeys(
const std::string& key,
const reply_callback_t& reply_callback);
565 std::future<reply>
hkeys(
const std::string& key);
567 client&
hlen(
const std::string& key,
const reply_callback_t& reply_callback);
568 std::future<reply>
hlen(
const std::string& key);
570 client&
hmget(
const std::string& key,
const std::vector<std::string>& fields,
const reply_callback_t& reply_callback);
571 std::future<reply>
hmget(
const std::string& key,
const std::vector<std::string>& fields);
573 client&
hmset(
const std::string& key,
const std::vector<std::pair<std::string, std::string>>& field_val,
const reply_callback_t& reply_callback);
574 std::future<reply>
hmset(
const std::string& key,
const std::vector<std::pair<std::string, std::string>>& field_val);
576 client&
hset(
const std::string& key,
const std::string& field,
const std::string& value,
const reply_callback_t& reply_callback);
577 std::future<reply>
hset(
const std::string& key,
const std::string& field,
const std::string& value);
579 client&
hsetnx(
const std::string& key,
const std::string& field,
const std::string& value,
const reply_callback_t& reply_callback);
580 std::future<reply>
hsetnx(
const std::string& key,
const std::string& field,
const std::string& value);
582 client&
hstrlen(
const std::string& key,
const std::string& field,
const reply_callback_t& reply_callback);
583 std::future<reply>
hstrlen(
const std::string& key,
const std::string& field);
585 client&
hvals(
const std::string& key,
const reply_callback_t& reply_callback);
586 std::future<reply>
hvals(
const std::string& key);
588 client&
incr(
const std::string& key,
const reply_callback_t& reply_callback);
589 std::future<reply>
incr(
const std::string& key);
591 client&
incrby(
const std::string& key,
int incr,
const reply_callback_t& reply_callback);
592 std::future<reply>
incrby(
const std::string& key,
int incr);
594 client&
incrbyfloat(
const std::string& key,
float incr,
const reply_callback_t& reply_callback);
595 std::future<reply>
incrbyfloat(
const std::string& key,
float incr);
597 client&
info(
const reply_callback_t& reply_callback);
598 client&
info(
const std::string& section,
const reply_callback_t& reply_callback);
599 std::future<reply>
info(
const std::string& section =
"default");
601 client&
keys(
const std::string& pattern,
const reply_callback_t& reply_callback);
602 std::future<reply>
keys(
const std::string& pattern);
607 client&
lindex(
const std::string& key,
int index,
const reply_callback_t& reply_callback);
608 std::future<reply>
lindex(
const std::string& key,
int index);
610 client&
linsert(
const std::string& key,
const std::string& before_after,
const std::string& pivot,
const std::string& value,
const reply_callback_t& reply_callback);
611 std::future<reply>
linsert(
const std::string& key,
const std::string& before_after,
const std::string& pivot,
const std::string& value);
613 client&
llen(
const std::string& key,
const reply_callback_t& reply_callback);
614 std::future<reply>
llen(
const std::string& key);
616 client&
lpop(
const std::string& key,
const reply_callback_t& reply_callback);
617 std::future<reply>
lpop(
const std::string& key);
619 client&
lpush(
const std::string& key,
const std::vector<std::string>& values,
const reply_callback_t& reply_callback);
620 std::future<reply>
lpush(
const std::string& key,
const std::vector<std::string>& values);
622 client&
lpushx(
const std::string& key,
const std::string& value,
const reply_callback_t& reply_callback);
623 std::future<reply>
lpushx(
const std::string& key,
const std::string& value);
625 client&
lrange(
const std::string& key,
int start,
int stop,
const reply_callback_t& reply_callback);
626 std::future<reply>
lrange(
const std::string& key,
int start,
int stop);
628 client&
lrem(
const std::string& key,
int count,
const std::string& value,
const reply_callback_t& reply_callback);
629 std::future<reply>
lrem(
const std::string& key,
int count,
const std::string& value);
631 client&
lset(
const std::string& key,
int index,
const std::string& value,
const reply_callback_t& reply_callback);
632 std::future<reply>
lset(
const std::string& key,
int index,
const std::string& value);
634 client&
ltrim(
const std::string& key,
int start,
int stop,
const reply_callback_t& reply_callback);
635 std::future<reply>
ltrim(
const std::string& key,
int start,
int stop);
637 client&
mget(
const std::vector<std::string>& keys,
const reply_callback_t& reply_callback);
638 std::future<reply>
mget(
const std::vector<std::string>& keys);
640 client&
migrate(
const std::string& host,
int port,
const std::string& key,
const std::string& dest_db,
int timeout,
const reply_callback_t& reply_callback);
641 client&
migrate(
const std::string& host,
int port,
const std::string& key,
const std::string& dest_db,
int timeout,
bool copy,
bool replace,
const std::vector<std::string>& keys,
const reply_callback_t& reply_callback);
642 std::future<reply>
migrate(
const std::string& host,
int port,
const std::string& key,
const std::string& dest_db,
int timeout,
bool copy =
false,
bool replace =
false,
const std::vector<std::string>& keys = {});
647 client&
move(
const std::string& key,
const std::string& db,
const reply_callback_t& reply_callback);
648 std::future<reply>
move(
const std::string& key,
const std::string& db);
650 client&
mset(
const std::vector<std::pair<std::string, std::string>>& key_vals,
const reply_callback_t& reply_callback);
651 std::future<reply>
mset(
const std::vector<std::pair<std::string, std::string>>& key_vals);
653 client&
msetnx(
const std::vector<std::pair<std::string, std::string>>& key_vals,
const reply_callback_t& reply_callback);
654 std::future<reply>
msetnx(
const std::vector<std::pair<std::string, std::string>>& key_vals);
656 client&
multi(
const reply_callback_t& reply_callback);
657 std::future<reply>
multi();
659 client&
object(
const std::string& subcommand,
const std::vector<std::string>& args,
const reply_callback_t& reply_callback);
660 std::future<reply>
object(
const std::string& subcommand,
const std::vector<std::string>& args);
662 client&
persist(
const std::string& key,
const reply_callback_t& reply_callback);
663 std::future<reply>
persist(
const std::string& key);
665 client&
pexpire(
const std::string& key,
int milliseconds,
const reply_callback_t& reply_callback);
666 std::future<reply>
pexpire(
const std::string& key,
int milliseconds);
668 client&
pexpireat(
const std::string& key,
int milliseconds_timestamp,
const reply_callback_t& reply_callback);
669 std::future<reply>
pexpireat(
const std::string& key,
int milliseconds_timestamp);
671 client&
pfadd(
const std::string& key,
const std::vector<std::string>& elements,
const reply_callback_t& reply_callback);
672 std::future<reply>
pfadd(
const std::string& key,
const std::vector<std::string>& elements);
674 client&
pfcount(
const std::vector<std::string>& keys,
const reply_callback_t& reply_callback);
675 std::future<reply>
pfcount(
const std::vector<std::string>& keys);
677 client&
pfmerge(
const std::string& destkey,
const std::vector<std::string>& sourcekeys,
const reply_callback_t& reply_callback);
678 std::future<reply>
pfmerge(
const std::string& destkey,
const std::vector<std::string>& sourcekeys);
680 client&
ping(
const reply_callback_t& reply_callback);
681 std::future<reply>
ping();
683 client&
ping(
const std::string& message,
const reply_callback_t& reply_callback);
684 std::future<reply>
ping(
const std::string& message);
686 client&
psetex(
const std::string& key,
int milliseconds,
const std::string& val,
const reply_callback_t& reply_callback);
687 std::future<reply>
psetex(
const std::string& key,
int milliseconds,
const std::string& val);
689 client&
publish(
const std::string& channel,
const std::string& message,
const reply_callback_t& reply_callback);
690 std::future<reply>
publish(
const std::string& channel,
const std::string& message);
692 client&
pubsub(
const std::string& subcommand,
const std::vector<std::string>& args,
const reply_callback_t& reply_callback);
693 std::future<reply>
pubsub(
const std::string& subcommand,
const std::vector<std::string>& args);
695 client&
pttl(
const std::string& key,
const reply_callback_t& reply_callback);
696 std::future<reply>
pttl(
const std::string& key);
698 client&
quit(
const reply_callback_t& reply_callback);
699 std::future<reply>
quit();
710 client&
rename(
const std::string& key,
const std::string& newkey,
const reply_callback_t& reply_callback);
711 std::future<reply>
rename(
const std::string& key,
const std::string& newkey);
713 client&
renamenx(
const std::string& key,
const std::string& newkey,
const reply_callback_t& reply_callback);
714 std::future<reply>
renamenx(
const std::string& key,
const std::string& newkey);
716 client&
restore(
const std::string& key,
int ttl,
const std::string& serialized_value,
const reply_callback_t& reply_callback);
717 std::future<reply>
restore(
const std::string& key,
int ttl,
const std::string& serialized_value);
719 client&
restore(
const std::string& key,
int ttl,
const std::string& serialized_value,
const std::string& replace,
const reply_callback_t& reply_callback);
720 std::future<reply>
restore(
const std::string& key,
int ttl,
const std::string& serialized_value,
const std::string& replace);
722 client&
role(
const reply_callback_t& reply_callback);
723 std::future<reply>
role();
725 client&
rpop(
const std::string& key,
const reply_callback_t& reply_callback);
726 std::future<reply>
rpop(
const std::string& key);
728 client&
rpoplpush(
const std::string& source,
const std::string& destination,
const reply_callback_t& reply_callback);
729 std::future<reply>
rpoplpush(
const std::string& src,
const std::string& dst);
731 client&
rpush(
const std::string& key,
const std::vector<std::string>& values,
const reply_callback_t& reply_callback);
732 std::future<reply>
rpush(
const std::string& key,
const std::vector<std::string>& values);
734 client&
rpushx(
const std::string& key,
const std::string& value,
const reply_callback_t& reply_callback);
735 std::future<reply>
rpushx(
const std::string& key,
const std::string& value);
737 client&
sadd(
const std::string& key,
const std::vector<std::string>& members,
const reply_callback_t& reply_callback);
738 std::future<reply>
sadd(
const std::string& key,
const std::vector<std::string>& members);
740 client&
save(
const reply_callback_t& reply_callback);
741 std::future<reply>
save();
743 client&
scan(
int cursor,
const std::string& pattern,
int count,
const reply_callback_t& reply_callback);
744 std::future<reply>
scan(
int cursor,
const std::string& pattern,
int count);
746 client&
scard(
const std::string& key,
const reply_callback_t& reply_callback);
747 std::future<reply>
scard(
const std::string& key);
749 client&
script_debug(
const std::string& mode,
const reply_callback_t& reply_callback);
750 std::future<reply>
script_debug(
const std::string& mode);
752 client&
script_exists(
const std::vector<std::string>& scripts,
const reply_callback_t& reply_callback);
753 std::future<reply>
script_exists(
const std::vector<std::string>& scripts);
761 client&
script_load(
const std::string& script,
const reply_callback_t& reply_callback);
762 std::future<reply>
script_load(
const std::string& script);
764 client&
sdiff(
const std::vector<std::string>& keys,
const reply_callback_t& reply_callback);
765 std::future<reply>
sdiff(
const std::vector<std::string>& keys);
767 client&
sdiffstore(
const std::string& destination,
const std::vector<std::string>& keys,
const reply_callback_t& reply_callback);
768 std::future<reply>
sdiffstore(
const std::string& dst,
const std::vector<std::string>& keys);
770 client&
select(
int index,
const reply_callback_t& reply_callback);
771 std::future<reply>
select(
int index);
773 client&
set(
const std::string& key,
const std::string& value,
const reply_callback_t& reply_callback);
774 std::future<reply>
set(
const std::string& key,
const std::string& value);
776 client&
set_advanced(
const std::string& key,
const std::string& value,
const reply_callback_t& reply_callback);
777 client&
set_advanced(
const std::string& key,
const std::string& value,
bool ex,
int ex_sec,
bool px,
int px_milli,
bool nx,
bool xx,
const reply_callback_t& reply_callback);
778 std::future<reply>
set_advanced(
const std::string& key,
const std::string& value,
bool ex =
false,
int ex_sec = 0,
bool px =
false,
int px_milli = 0,
bool nx =
false,
bool xx =
false);
780 client&
setbit_(
const std::string& key,
int offset,
const std::string& value,
const reply_callback_t& reply_callback);
781 std::future<reply>
setbit_(
const std::string& key,
int offset,
const std::string& value);
783 client&
setex(
const std::string& key,
int seconds,
const std::string& value,
const reply_callback_t& reply_callback);
784 std::future<reply>
setex(
const std::string& key,
int seconds,
const std::string& value);
786 client&
setnx(
const std::string& key,
const std::string& value,
const reply_callback_t& reply_callback);
787 std::future<reply>
setnx(
const std::string& key,
const std::string& value);
789 client&
setrange(
const std::string& key,
int offset,
const std::string& value,
const reply_callback_t& reply_callback);
790 std::future<reply>
setrange(
const std::string& key,
int offset,
const std::string& value);
795 client&
shutdown(
const std::string& save,
const reply_callback_t& reply_callback);
796 std::future<reply>
shutdown(
const std::string& save);
798 client&
sinter(
const std::vector<std::string>& keys,
const reply_callback_t& reply_callback);
799 std::future<reply>
sinter(
const std::vector<std::string>& keys);
801 client&
sinterstore(
const std::string& destination,
const std::vector<std::string>& keys,
const reply_callback_t& reply_callback);
802 std::future<reply>
sinterstore(
const std::string& dst,
const std::vector<std::string>& keys);
804 client&
sismember(
const std::string& key,
const std::string& member,
const reply_callback_t& reply_callback);
805 std::future<reply>
sismember(
const std::string& key,
const std::string& member);
807 client&
slaveof(
const std::string& host,
int port,
const reply_callback_t& reply_callback);
808 std::future<reply>
slaveof(
const std::string& host,
int port);
810 client&
slowlog(
const std::string subcommand,
const reply_callback_t& reply_callback);
811 std::future<reply>
slowlog(
const std::string& subcommand);
813 client&
slowlog(
const std::string subcommand,
const std::string& argument,
const reply_callback_t& reply_callback);
814 std::future<reply>
slowlog(
const std::string& subcommand,
const std::string& argument);
816 client&
smembers(
const std::string& key,
const reply_callback_t& reply_callback);
817 std::future<reply>
smembers(
const std::string& key);
819 client&
smove(
const std::string& source,
const std::string& destination,
const std::string& member,
const reply_callback_t& reply_callback);
820 std::future<reply>
smove(
const std::string& src,
const std::string& dst,
const std::string& member);
822 client&
spop(
const std::string& key,
const reply_callback_t& reply_callback);
823 std::future<reply>
spop(
const std::string& key);
825 client&
spop(
const std::string& key,
int count,
const reply_callback_t& reply_callback);
826 std::future<reply>
spop(
const std::string& key,
int count);
828 client&
srandmember(
const std::string& key,
const reply_callback_t& reply_callback);
829 std::future<reply>
srandmember(
const std::string& key);
831 client&
srandmember(
const std::string& key,
int count,
const reply_callback_t& reply_callback);
832 std::future<reply>
srandmember(
const std::string& key,
int count);
834 client&
srem(
const std::string& key,
const std::vector<std::string>& members,
const reply_callback_t& reply_callback);
835 std::future<reply>
srem(
const std::string& key,
const std::vector<std::string>& members);
837 client&
strlen(
const std::string& key,
const reply_callback_t& reply_callback);
838 std::future<reply>
strlen(
const std::string& key);
840 client&
sunion(
const std::vector<std::string>& keys,
const reply_callback_t& reply_callback);
841 std::future<reply>
sunion(
const std::vector<std::string>& keys);
843 client&
sunionstore(
const std::string& destination,
const std::vector<std::string>& keys,
const reply_callback_t& reply_callback);
844 std::future<reply>
sunionstore(
const std::string& dst,
const std::vector<std::string>& keys);
846 client&
sync(
const reply_callback_t& reply_callback);
847 std::future<reply>
sync();
849 client&
time(
const reply_callback_t& reply_callback);
850 std::future<reply>
time();
852 client&
ttl(
const std::string& key,
const reply_callback_t& reply_callback);
853 std::future<reply>
ttl(
const std::string& key);
855 client&
type(
const std::string& key,
const reply_callback_t& reply_callback);
856 std::future<reply>
type(
const std::string& key);
861 client&
wait(
int numslaves,
int timeout,
const reply_callback_t& reply_callback);
862 std::future<reply>
wait(
int numslaves,
int timeout);
864 client&
watch(
const std::vector<std::string>& keys,
const reply_callback_t& reply_callback);
865 std::future<reply>
watch(
const std::vector<std::string>& keys);
867 client&
zadd(
const std::string& key,
const std::vector<std::string>& options,
const std::map<std::string, std::string>& score_members,
const reply_callback_t& reply_callback);
868 std::future<reply>
zadd(
const std::string& key,
const std::vector<std::string>& options,
const std::map<std::string, std::string>& score_members);
870 client&
zcard(
const std::string& key,
const reply_callback_t& reply_callback);
871 std::future<reply>
zcard(
const std::string& key);
873 client&
zcount(
const std::string& key,
int min,
int max,
const reply_callback_t& reply_callback);
874 std::future<reply>
zcount(
const std::string& key,
int min,
int max);
876 client&
zcount(
const std::string& key,
double min,
double max,
const reply_callback_t& reply_callback);
877 std::future<reply>
zcount(
const std::string& key,
double min,
double max);
879 client&
zcount(
const std::string& key,
const std::string& min,
const std::string& max,
const reply_callback_t& reply_callback);
880 std::future<reply>
zcount(
const std::string& key,
const std::string& min,
const std::string& max);
882 client&
zincrby(
const std::string& key,
int incr,
const std::string& member,
const reply_callback_t& reply_callback);
883 std::future<reply>
zincrby(
const std::string& key,
int incr,
const std::string& member);
885 client&
zincrby(
const std::string& key,
double incr,
const std::string& member,
const reply_callback_t& reply_callback);
886 std::future<reply>
zincrby(
const std::string& key,
double incr,
const std::string& member);
888 client&
zincrby(
const std::string& key,
const std::string& incr,
const std::string& member,
const reply_callback_t& reply_callback);
889 std::future<reply>
zincrby(
const std::string& key,
const std::string& incr,
const std::string& member);
891 client&
zlexcount(
const std::string& key,
int min,
int max,
const reply_callback_t& reply_callback);
892 std::future<reply>
zlexcount(
const std::string& key,
int min,
int max);
894 client&
zlexcount(
const std::string& key,
double min,
double max,
const reply_callback_t& reply_callback);
895 std::future<reply>
zlexcount(
const std::string& key,
double min,
double max);
897 client&
zlexcount(
const std::string& key,
const std::string& min,
const std::string& max,
const reply_callback_t& reply_callback);
898 std::future<reply>
zlexcount(
const std::string& key,
const std::string& min,
const std::string& max);
900 client&
zrange(
const std::string& key,
int start,
int stop,
const reply_callback_t& reply_callback);
901 client&
zrange(
const std::string& key,
int start,
int stop,
bool withscores,
const reply_callback_t& reply_callback);
902 std::future<reply>
zrange(
const std::string& key,
int start,
int stop,
bool withscores =
false);
904 client&
zrange(
const std::string& key,
double start,
double stop,
const reply_callback_t& reply_callback);
905 client&
zrange(
const std::string& key,
double start,
double stop,
bool withscores,
const reply_callback_t& reply_callback);
906 std::future<reply>
zrange(
const std::string& key,
double start,
double stop,
bool withscores =
false);
908 client&
zrange(
const std::string& key,
const std::string& start,
const std::string& stop,
const reply_callback_t& reply_callback);
909 client&
zrange(
const std::string& key,
const std::string& start,
const std::string& stop,
bool withscores,
const reply_callback_t& reply_callback);
910 std::future<reply>
zrange(
const std::string& key,
const std::string& start,
const std::string& stop,
bool withscores =
false);
912 client&
zrank(
const std::string& key,
const std::string& member,
const reply_callback_t& reply_callback);
913 std::future<reply>
zrank(
const std::string& key,
const std::string& member);
915 client&
zrem(
const std::string& key,
const std::vector<std::string>& members,
const reply_callback_t& reply_callback);
916 std::future<reply>
zrem(
const std::string& key,
const std::vector<std::string>& members);
918 client&
zremrangebylex(
const std::string& key,
int min,
int max,
const reply_callback_t& reply_callback);
919 std::future<reply>
zremrangebylex(
const std::string& key,
int min,
int max);
921 client&
zremrangebylex(
const std::string& key,
double min,
double max,
const reply_callback_t& reply_callback);
922 std::future<reply>
zremrangebylex(
const std::string& key,
double min,
double max);
924 client&
zremrangebylex(
const std::string& key,
const std::string& min,
const std::string& max,
const reply_callback_t& reply_callback);
925 std::future<reply>
zremrangebylex(
const std::string& key,
const std::string& min,
const std::string& max);
927 client&
zremrangebyrank(
const std::string& key,
int start,
int stop,
const reply_callback_t& reply_callback);
928 std::future<reply>
zremrangebyrank(
const std::string& key,
int start,
int stop);
930 client&
zremrangebyrank(
const std::string& key,
double start,
double stop,
const reply_callback_t& reply_callback);
931 std::future<reply>
zremrangebyrank(
const std::string& key,
double start,
double stop);
933 client&
zremrangebyrank(
const std::string& key,
const std::string& start,
const std::string& stop,
const reply_callback_t& reply_callback);
934 std::future<reply>
zremrangebyrank(
const std::string& key,
const std::string& start,
const std::string& stop);
936 client&
zremrangebyscore(
const std::string& key,
int min,
int max,
const reply_callback_t& reply_callback);
937 std::future<reply>
zremrangebyscore(
const std::string& key,
int min,
int max);
939 client&
zremrangebyscore(
const std::string& key,
double min,
double max,
const reply_callback_t& reply_callback);
940 std::future<reply>
zremrangebyscore(
const std::string& key,
double min,
double max);
942 client&
zremrangebyscore(
const std::string& key,
const std::string& min,
const std::string& max,
const reply_callback_t& reply_callback);
943 std::future<reply>
zremrangebyscore(
const std::string& key,
const std::string& min,
const std::string& max);
945 client&
zrevrange(
const std::string& key,
int start,
int stop,
const reply_callback_t& reply_callback);
946 client&
zrevrange(
const std::string& key,
int start,
int stop,
bool withscores,
const reply_callback_t& reply_callback);
947 std::future<reply>
zrevrange(
const std::string& key,
int start,
int stop,
bool withscores =
false);
949 client&
zrevrange(
const std::string& key,
double start,
double stop,
const reply_callback_t& reply_callback);
950 client&
zrevrange(
const std::string& key,
double start,
double stop,
bool withscores,
const reply_callback_t& reply_callback);
951 std::future<reply>
zrevrange(
const std::string& key,
double start,
double stop,
bool withscores =
false);
953 client&
zrevrange(
const std::string& key,
const std::string& start,
const std::string& stop,
const reply_callback_t& reply_callback);
954 client&
zrevrange(
const std::string& key,
const std::string& start,
const std::string& stop,
bool withscores,
const reply_callback_t& reply_callback);
955 std::future<reply>
zrevrange(
const std::string& key,
const std::string& start,
const std::string& stop,
bool withscores =
false);
957 client&
zrevrank(
const std::string& key,
const std::string& member,
const reply_callback_t& reply_callback);
958 std::future<reply>
zrevrank(
const std::string& key,
const std::string& member);
960 client&
zscore(
const std::string& key,
const std::string& member,
const reply_callback_t& reply_callback);
961 std::future<reply>
zscore(
const std::string& key,
const std::string& member);
979 template <
typename T>
980 typename std::enable_if<std::is_same<T, client_type>::value>
::type 983 template <
typename T>
984 typename std::enable_if<std::is_same<T, bool>::value>
::type 987 template <
typename T>
988 typename std::enable_if<std::is_integral<T>::value>
::type 991 template <
typename T>
992 typename std::enable_if<std::is_class<T>::value>
::type 995 template <
typename T,
typename... Ts>
997 client_kill_impl(std::vector<std::string>& redis_cmd, reply_callback_t&
reply,
const T& arg,
const Ts&... args);
999 template <
typename T>
1001 client_kill_impl(std::vector<std::string>& redis_cmd, reply_callback_t& reply,
const T& arg);
1031 std::future<reply>
exec_cmd(
const std::function<
client&(
const reply_callback_t&)>& f);
std::future< reply > script_kill()
std::atomic_bool m_cancel
Definition: client.hpp:1098
client & restore(const std::string &key, int ttl, const std::string &serialized_value, const reply_callback_t &reply_callback)
client & hstrlen(const std::string &key, const std::string &field, const reply_callback_t &reply_callback)
std::future< reply > sync()
std::uint32_t m_connect_timeout_msecs
Definition: client.hpp:1077
client & bitcount(const std::string &key, const reply_callback_t &reply_callback)
Definition: redis_connection.hpp:45
client & rpoplpush(const std::string &source, const std::string &destination, const reply_callback_t &reply_callback)
std::future< reply > ping()
std::future< reply > config_rewrite()
Definition: client.hpp:1037
client & sunion(const std::vector< std::string > &keys, const reply_callback_t &reply_callback)
client & scard(const std::string &key, const reply_callback_t &reply_callback)
client & set_advanced(const std::string &key, const std::string &value, const reply_callback_t &reply_callback)
client & publish(const std::string &channel, const std::string &message, const reply_callback_t &reply_callback)
client & config_get(const std::string ¶m, const reply_callback_t &reply_callback)
client & scan(int cursor, const std::string &pattern, int count, const reply_callback_t &reply_callback)
void unprotected_send(const std::vector< std::string > &redis_cmd, const reply_callback_t &callback)
client & msetnx(const std::vector< std::pair< std::string, std::string >> &key_vals, const reply_callback_t &reply_callback)
std::future< reply > client_kill_future(const T, const Ts...)
Definition: client.ipp:122
std::future< reply > cluster_failover()
std::future< reply > exec()
client & getrange(const std::string &key, int start, int end, const reply_callback_t &reply_callback)
client & geodist(const std::string &key, const std::string &member_1, const std::string &member_2, const reply_callback_t &reply_callback)
void connection_receive_handler(network::redis_connection &connection, reply &reply)
Definition: client.hpp:43
client & cluster_setslot(const std::string &slot, const std::string &mode, const reply_callback_t &reply_callback)
client & geoadd(const std::string &key, const std::vector< std::tuple< std::string, std::string, std::string >> &long_lat_memb, const reply_callback_t &reply_callback)
std::future< reply > cluster_saveconfig()
client & zlexcount(const std::string &key, int min, int max, const reply_callback_t &reply_callback)
std::int32_t m_current_reconnect_attempts
Definition: client.hpp:1085
std::future< reply > command_count()
client & cluster_getkeysinslot(const std::string &slot, int count, const reply_callback_t &reply_callback)
std::future< reply > bgrewriteaof()
client & cluster_delslots(const std::vector< std::string > &p_slots, const reply_callback_t &reply_callback)
client & rpush(const std::string &key, const std::vector< std::string > &values, const reply_callback_t &reply_callback)
std::future< reply > command_getkeys()
client & getbit(const std::string &key, int offset, const reply_callback_t &reply_callback)
client & setnx(const std::string &key, const std::string &value, const reply_callback_t &reply_callback)
client & rpushx(const std::string &key, const std::string &value, const reply_callback_t &reply_callback)
client & brpop(const std::vector< std::string > &keys, int timeout, const reply_callback_t &reply_callback)
std::future< reply > readwrite()
std::string m_master_name
Definition: client.hpp:1054
client & blpop(const std::vector< std::string > &keys, int timeout, const reply_callback_t &reply_callback)
client & operator=(const client &)=delete
assignment operator
client & cluster_forget(const std::string &node_id, const reply_callback_t &reply_callback)
client & cluster_meet(const std::string &ip, int port, const reply_callback_t &reply_callback)
client & hdel(const std::string &key, const std::vector< std::string > &fields, const reply_callback_t &reply_callback)
connect_callback_t m_connect_callback
Definition: client.hpp:1108
std::future< reply > flushall()
std::future< reply > cluster_info()
client & lset(const std::string &key, int index, const std::string &value, const reply_callback_t &reply_callback)
client & zincrby(const std::string &key, int incr, const std::string &member, const reply_callback_t &reply_callback)
client & smembers(const std::string &key, const reply_callback_t &reply_callback)
client & setbit_(const std::string &key, int offset, const std::string &value, const reply_callback_t &reply_callback)
void sleep_before_next_reconnect_attempt(void)
client & client_setname(const std::string &name, const reply_callback_t &reply_callback)
std::future< reply > exec_cmd(const std::function< client &(const reply_callback_t &)> &f)
Execute a command on the client and tie the callback to a future.
client & exists(const std::vector< std::string > &keys, const reply_callback_t &reply_callback)
std::future< reply > debug_segfault()
client & hexists(const std::string &key, const std::string &field, const reply_callback_t &reply_callback)
client & select(int index, const reply_callback_t &reply_callback)
client & zremrangebyscore(const std::string &key, int min, int max, const reply_callback_t &reply_callback)
client & lindex(const std::string &key, int index, const reply_callback_t &reply_callback)
std::future< reply > command()
client & hset(const std::string &key, const std::string &field, const std::string &value, const reply_callback_t &reply_callback)
client & brpoplpush(const std::string &src, const std::string &dst, int timeout, const reply_callback_t &reply_callback)
client & zremrangebylex(const std::string &key, int min, int max, const reply_callback_t &reply_callback)
void cancel_reconnect(void)
client & sinter(const std::vector< std::string > &keys, const reply_callback_t &reply_callback)
client & object(const std::string &subcommand, const std::vector< std::string > &args, const reply_callback_t &reply_callback)
std::future< reply > unwatch()
client & sadd(const std::string &key, const std::vector< std::string > &members, const reply_callback_t &reply_callback)
client & pttl(const std::string &key, const reply_callback_t &reply_callback)
client & hget(const std::string &key, const std::string &field, const reply_callback_t &reply_callback)
client & pexpire(const std::string &key, int milliseconds, const reply_callback_t &reply_callback)
client & llen(const std::string &key, const reply_callback_t &reply_callback)
client & cluster_countkeysinslot(const std::string &slot, const reply_callback_t &reply_callback)
std::future< reply > save()
client & srandmember(const std::string &key, const reply_callback_t &reply_callback)
std::uint32_t m_reconnect_interval_msecs
Definition: client.hpp:1089
client & spop(const std::string &key, const reply_callback_t &reply_callback)
reply_callback_t callback
Definition: client.hpp:1039
client & client_kill(const std::string &host, int port, const T &arg, const Ts &... args)
Definition: client.ipp:93
client & zremrangebyrank(const std::string &key, int start, int stop, const reply_callback_t &reply_callback)
int m_database_index
Definition: client.hpp:1062
client & sunionstore(const std::string &destination, const std::vector< std::string > &keys, const reply_callback_t &reply_callback)
client & sismember(const std::string &key, const std::string &member, const reply_callback_t &reply_callback)
client & sdiffstore(const std::string &destination, const std::vector< std::string > &keys, const reply_callback_t &reply_callback)
client & type(const std::string &key, const reply_callback_t &reply_callback)
client & client_pause(int timeout, const reply_callback_t &reply_callback)
void connection_disconnection_handler(network::redis_connection &connection)
client & strlen(const std::string &key, const reply_callback_t &reply_callback)
std::atomic_bool m_reconnecting
Definition: client.hpp:1094
client & script_load(const std::string &script, const reply_callback_t &reply_callback)
client & expire(const std::string &key, int seconds, const reply_callback_t &reply_callback)
std::future< reply > cluster_nodes()
std::future< reply > dbsize()
client & del(const std::vector< std::string > &key, const reply_callback_t &reply_callback)
client & pfcount(const std::vector< std::string > &keys, const reply_callback_t &reply_callback)
std::string m_redis_server
Definition: client.hpp:1046
client & lpop(const std::string &key, const reply_callback_t &reply_callback)
std::future< reply > role()
void client_kill_impl(std::vector< std::string > &redis_cmd, reply_callback_t &reply, const T &arg, const Ts &... args)
Definition: client.ipp:66
std::mutex m_callbacks_mutex
Definition: client.hpp:1113
std::future< reply > bgsave()
client & debug_object(const std::string &key, const reply_callback_t &reply_callback)
client & cluster_set_config_epoch(const std::string &epoch, const reply_callback_t &reply_callback)
client & wait(int numslaves, int timeout, const reply_callback_t &reply_callback)
client & zrank(const std::string &key, const std::string &member, const reply_callback_t &reply_callback)
client & srem(const std::string &key, const std::vector< std::string > &members, const reply_callback_t &reply_callback)
std::future< reply > flushdb()
client & rpop(const std::string &key, const reply_callback_t &reply_callback)
client & sdiff(const std::vector< std::string > &keys, const reply_callback_t &reply_callback)
client & sync_commit(const std::chrono::duration< Rep, Period > &timeout)
Definition: client.hpp:212
client & cluster_slaves(const std::string &node_id, const reply_callback_t &reply_callback)
client & getset(const std::string &key, const std::string &val, const reply_callback_t &reply_callback)
client & pfadd(const std::string &key, const std::vector< std::string > &elements, const reply_callback_t &reply_callback)
bool is_reconnecting(void) const
client & renamenx(const std::string &key, const std::string &newkey, const reply_callback_t &reply_callback)
connect_state
Definition: client.hpp:66
client & decr(const std::string &key, const reply_callback_t &reply_callback)
std::function< void(reply &)> reply_callback_t
Definition: client.hpp:164
std::future< reply > monitor()
std::size_t m_redis_port
Definition: client.hpp:1050
std::future< reply > lastsave()
void disconnect(bool wait_for_removal=false)
client & auth(const std::string &password, const reply_callback_t &reply_callback)
void resend_failed_commands(void)
client & sync_commit(void)
client & ltrim(const std::string &key, int start, int stop, const reply_callback_t &reply_callback)
std::future< reply > client_list()
client & hincrby(const std::string &key, const std::string &field, int incr, const reply_callback_t &reply_callback)
client & linsert(const std::string &key, const std::string &before_after, const std::string &pivot, const std::string &value, const reply_callback_t &reply_callback)
client & lrem(const std::string &key, int count, const std::string &value, const reply_callback_t &reply_callback)
std::future< reply > time()
client & zcount(const std::string &key, int min, int max, const reply_callback_t &reply_callback)
network::redis_connection m_client
Definition: client.hpp:1067
std::future< reply > discard()
client & smove(const std::string &source, const std::string &destination, const std::string &member, const reply_callback_t &reply_callback)
client & send(const std::vector< std::string > &redis_cmd, const reply_callback_t &callback)
client & pexpireat(const std::string &key, int milliseconds_timestamp, const reply_callback_t &reply_callback)
client & client_reply(const std::string &mode, const reply_callback_t &reply_callback)
client & cluster_replicate(const std::string &node_id, const reply_callback_t &reply_callback)
client & zadd(const std::string &key, const std::vector< std::string > &options, const std::map< std::string, std::string > &score_members, const reply_callback_t &reply_callback)
client & ttl(const std::string &key, const reply_callback_t &reply_callback)
Definition: sentinel.hpp:34
client & hkeys(const std::string &key, const reply_callback_t &reply_callback)
client & zrevrank(const std::string &key, const std::string &member, const reply_callback_t &reply_callback)
client & expireat(const std::string &key, int timestamp, const reply_callback_t &reply_callback)
client & incr(const std::string &key, const reply_callback_t &reply_callback)
client & setex(const std::string &key, int seconds, const std::string &value, const reply_callback_t &reply_callback)
client & hvals(const std::string &key, const reply_callback_t &reply_callback)
client & bitop(const std::string &operation, const std::string &destkey, const std::vector< std::string > &keys, const reply_callback_t &reply_callback)
void unprotected_auth(const std::string &password, const reply_callback_t &reply_callback)
client & hsetnx(const std::string &key, const std::string &field, const std::string &value, const reply_callback_t &reply_callback)
client & bitpos(const std::string &key, int bit, const reply_callback_t &reply_callback)
client & cluster_count_failure_reports(const std::string &node_id, const reply_callback_t &reply_callback)
client & persist(const std::string &key, const reply_callback_t &reply_callback)
std::condition_variable m_sync_condvar
Definition: client.hpp:1118
client & hmset(const std::string &key, const std::vector< std::pair< std::string, std::string >> &field_val, const reply_callback_t &reply_callback)
std::string m_password
Definition: client.hpp:1058
client & mset(const std::vector< std::pair< std::string, std::string >> &key_vals, const reply_callback_t &reply_callback)
client & move(const std::string &key, const std::string &db, const reply_callback_t &reply_callback)
client & decrby(const std::string &key, int val, const reply_callback_t &reply_callback)
#define __CPP_REDIS_LOG(level, msg)
Definition: logger.hpp:212
client & zrem(const std::string &key, const std::vector< std::string > &members, const reply_callback_t &reply_callback)
client & setrange(const std::string &key, int offset, const std::string &value, const reply_callback_t &reply_callback)
client & rename(const std::string &key, const std::string &newkey, const reply_callback_t &reply_callback)
void clear_sentinels(void)
client & migrate(const std::string &host, int port, const std::string &key, const std::string &dest_db, int timeout, const reply_callback_t &reply_callback)
client & info(const reply_callback_t &reply_callback)
std::enable_if< std::is_same< T, client_type >::value >::type client_kill_unpack_arg(std::vector< std::string > &redis_cmd, reply_callback_t &, client_type type)
client kill impl
Definition: client.ipp:30
client & mget(const std::vector< std::string > &keys, const reply_callback_t &reply_callback)
std::future< reply > quit()
client & echo(const std::string &msg, const reply_callback_t &reply_callback)
client & watch(const std::vector< std::string > &keys, const reply_callback_t &reply_callback)
client & evalsha(const std::string &sha1, int numkeys, const std::vector< std::string > &keys, const std::vector< std::string > &args, const reply_callback_t &reply_callback)
client & incrbyfloat(const std::string &key, float incr, const reply_callback_t &reply_callback)
std::future< reply > multi()
client & geopos(const std::string &key, const std::vector< std::string > &members, const reply_callback_t &reply_callback)
void add_sentinel(const std::string &host, std::size_t port)
client & script_exists(const std::vector< std::string > &scripts, const reply_callback_t &reply_callback)
client & lrange(const std::string &key, int start, int stop, const reply_callback_t &reply_callback)
client & command_info(const std::vector< std::string > &command_name, const reply_callback_t &reply_callback)
std::queue< command_request > m_commands
Definition: client.hpp:1103
client & zcard(const std::string &key, const reply_callback_t &reply_callback)
void connect(const std::string &host="127.0.0.1", std::size_t port=6379, const connect_callback_t &connect_callback=nullptr, std::uint32_t timeout_msecs=0, std::int32_t max_reconnects=0, std::uint32_t reconnect_interval_msecs=0)
client & zrevrange(const std::string &key, int start, int stop, const reply_callback_t &reply_callback)
const sentinel & get_sentinel(void) const
std::int32_t m_max_reconnects
Definition: client.hpp:1081
std::future< reply > config_resetstat()
client_type
Definition: client.hpp:49
cpp_redis::sentinel m_sentinel
Definition: client.hpp:1072
client & slowlog(const std::string subcommand, const reply_callback_t &reply_callback)
client & zrange(const std::string &key, int start, int stop, const reply_callback_t &reply_callback)
std::future< reply > randomkey()
bool should_reconnect(void) const
client & pfmerge(const std::string &destkey, const std::vector< std::string > &sourcekeys, const reply_callback_t &reply_callback)
client & hincrbyfloat(const std::string &key, const std::string &field, float incr, const reply_callback_t &reply_callback)
void debug(const std::string &msg, const std::string &file, std::size_t line)
client & incrby(const std::string &key, int incr, const reply_callback_t &reply_callback)
client & append(const std::string &key, const std::string &value, const reply_callback_t &reply_callback)
std::future< reply > client_getname()
client & cluster_keyslot(const std::string &key, const reply_callback_t &reply_callback)
client & sinterstore(const std::string &destination, const std::vector< std::string > &keys, const reply_callback_t &reply_callback)
void clear_callbacks(void)
client & hgetall(const std::string &key, const reply_callback_t &reply_callback)
client & config_set(const std::string ¶m, const std::string &val, const reply_callback_t &reply_callback)
client & cluster_addslots(const std::vector< std::string > &p_slots, const reply_callback_t &reply_callback)
client & slaveof(const std::string &host, int port, const reply_callback_t &reply_callback)
std::function< void(const std::string &host, std::size_t port, connect_state status)> connect_callback_t
Definition: client.hpp:101
std::future< reply > shutdown()
client & keys(const std::string &pattern, const reply_callback_t &reply_callback)
client & lpush(const std::string &key, const std::vector< std::string > &values, const reply_callback_t &reply_callback)
std::future< reply > script_flush()
std::atomic< unsigned int > m_callbacks_running
Definition: client.hpp:1123
client & cluster_reset(const reply_callback_t &reply_callback)
client & lpushx(const std::string &key, const std::string &value, const reply_callback_t &reply_callback)
bool is_connected(void) const
client & hlen(const std::string &key, const reply_callback_t &reply_callback)
client & eval(const std::string &script, int numkeys, const std::vector< std::string > &keys, const std::vector< std::string > &args, const reply_callback_t &reply_callback)
std::future< reply > cluster_slots()
client & geohash(const std::string &key, const std::vector< std::string > &members, const reply_callback_t &reply_callback)
void unprotected_select(int index, const reply_callback_t &reply_callback)
client & zscore(const std::string &key, const std::string &member, const reply_callback_t &reply_callback)
std::future< reply > readonly()
client & hmget(const std::string &key, const std::vector< std::string > &fields, const reply_callback_t &reply_callback)
Definition: array_builder.hpp:29
client & psetex(const std::string &key, int milliseconds, const std::string &val, const reply_callback_t &reply_callback)
client & dump(const std::string &key, const reply_callback_t &reply_callback)
std::vector< std::string > command
Definition: client.hpp:1038
client & script_debug(const std::string &mode, const reply_callback_t &reply_callback)