add redis_client_pipeline in all redis commands

This commit is contained in:
shuxin   zheng 2021-01-09 23:16:15 +08:00
parent 21c454a00a
commit b6f292085c
32 changed files with 132 additions and 36 deletions

View File

@ -61,6 +61,14 @@ public:
*/
redis(redis_client_cluster* cluster);
/**
* pipeline
* the constructor in redis pipeline mode
* @param pipeline {redis_client_pipeline*} pipeline
* the redis pipeline object
*/
redis(redis_client_pipeline* pipeline);
ACL_CPP_DEPRECATED
redis(redis_client_cluster* cluster, size_t max_conns);

View File

@ -36,6 +36,8 @@ public:
ACL_CPP_DEPRECATED
redis_cluster(redis_client_cluster* cluster, size_t max_conns);
redis_cluster(redis_client_pipeline* pipeline);
virtual ~redis_cluster(void);
/**

View File

@ -36,6 +36,8 @@ public:
ACL_CPP_DEPRECATED
redis_connection(redis_client_cluster* cluster, size_t max_conns);
redis_connection(redis_client_pipeline* pipeline);
virtual ~redis_connection(void);
/////////////////////////////////////////////////////////////////////

View File

@ -92,8 +92,6 @@ private:
double latitude_;
};
class redis_client;
class ACL_CPP_API redis_geo : virtual public redis_command
{
public:
@ -114,6 +112,9 @@ public:
ACL_CPP_DEPRECATED
redis_geo(redis_client_cluster* cluster, size_t max_conns);
redis_geo(redis_client_pipeline* pipeline);
virtual ~redis_geo();
/////////////////////////////////////////////////////////////////////

View File

@ -10,8 +10,6 @@
namespace acl
{
class redis_client;
/**
* redis Hash()
* redis Hash class, include commands as below:
@ -39,6 +37,8 @@ public:
ACL_CPP_DEPRECATED
redis_hash(redis_client_cluster* cluster, size_t max_conns);
redis_hash(redis_client_pipeline* pipeline);
virtual ~redis_hash(void);
/////////////////////////////////////////////////////////////////////

View File

@ -9,9 +9,6 @@
namespace acl
{
class redis_client;
class redis_client_cluster;
class ACL_CPP_API redis_hyperloglog : virtual public redis_command
{
public:
@ -33,6 +30,8 @@ public:
ACL_CPP_DEPRECATED
redis_hyperloglog(redis_client_cluster* cluster, size_t max_conns);
redis_hyperloglog(redis_client_pipeline* pipeline);
virtual ~redis_hyperloglog(void);
/**

View File

@ -8,9 +8,6 @@
namespace acl {
class redis_client;
class redis_client_cluster;
// redis 服务支持的数据类型分类
// the data type supported by redis
typedef enum
@ -44,6 +41,8 @@ public:
ACL_CPP_DEPRECATED
redis_key(redis_client_cluster* cluster, size_t max_conns);
redis_key(redis_client_pipeline* pipeline);
virtual ~redis_key(void);
/**

View File

@ -7,8 +7,6 @@
namespace acl
{
class redis_client;
class ACL_CPP_API redis_list : virtual public redis_command
{
public:
@ -30,6 +28,8 @@ public:
ACL_CPP_DEPRECATED
redis_list(redis_client_cluster* cluster, size_t max_conns);
redis_list(redis_client_pipeline* pipeline);
virtual ~redis_list(void);
/////////////////////////////////////////////////////////////////////

View File

@ -9,10 +9,6 @@
namespace acl
{
class redis_client;
class redis_result;
class string;
class ACL_CPP_API redis_pubsub : virtual public redis_command
{
public:
@ -34,6 +30,8 @@ public:
ACL_CPP_DEPRECATED
redis_pubsub(redis_client_cluster* cluster, size_t max_conns);
redis_pubsub(redis_client_pipeline* pipeline);
virtual ~redis_pubsub(void);
/////////////////////////////////////////////////////////////////////

View File

@ -9,9 +9,6 @@
namespace acl
{
class redis_client;
class redis_result;
class ACL_CPP_API redis_script : virtual public redis_command
{
public:
@ -33,6 +30,8 @@ public:
ACL_CPP_DEPRECATED
redis_script(redis_client_cluster* cluster, size_t max_conns);
redis_script(redis_client_pipeline* pipeline);
virtual ~redis_script(void);
/////////////////////////////////////////////////////////////////////

View File

@ -9,9 +9,6 @@
namespace acl
{
class redis_client;
class redis_result;
class ACL_CPP_API redis_server : virtual public redis_command
{
public:
@ -33,6 +30,8 @@ public:
ACL_CPP_DEPRECATED
redis_server(redis_client_cluster* cluster, size_t max_conns);
redis_server(redis_client_pipeline* pipeline);
virtual ~redis_server(void);
/////////////////////////////////////////////////////////////////////

View File

@ -9,8 +9,6 @@
namespace acl
{
class redis_client;
class ACL_CPP_API redis_set : virtual public redis_command
{
public:
@ -32,6 +30,8 @@ public:
ACL_CPP_DEPRECATED
redis_set(redis_client_cluster* cluster, size_t max_conns);
redis_set(redis_client_pipeline* pipeline);
virtual ~redis_set(void);
/////////////////////////////////////////////////////////////////////

View File

@ -8,9 +8,6 @@
namespace acl
{
class redis_client;
class redis_client_cluster;
struct redis_stream_field
{
string name;
@ -148,6 +145,7 @@ public:
redis_stream(void);
redis_stream(redis_client* conn);
redis_stream(redis_client_cluster* cluster);
redis_stream(redis_client_pipeline* pipeline);
ACL_CPP_DEPRECATED
redis_stream(redis_client_cluster* cluster, size_t max_conns);

View File

@ -9,10 +9,6 @@
namespace acl
{
class string;
class redis_client;
class redis_result;
/**
*
* all the commands in redis Strings are be implemented.
@ -35,6 +31,8 @@ public:
*/
redis_string(redis_client_cluster* cluster);
redis_string(redis_client_pipeline* pipeline);
ACL_CPP_DEPRECATED
redis_string(redis_client_cluster* cluster, size_t max_conns);

View File

@ -9,9 +9,6 @@
namespace acl
{
class redis_client;
class redis_result;
class ACL_CPP_API redis_transaction : virtual public redis_command
{
public:
@ -30,6 +27,8 @@ public:
*/
redis_transaction(redis_client_cluster* cluster);
redis_transaction(redis_client_pipeline* pipeline);
ACL_CPP_DEPRECATED
redis_transaction(redis_client_cluster* cluster, size_t max_conns);

View File

@ -10,8 +10,6 @@
namespace acl
{
class redis_client;
class ACL_CPP_API redis_zset : virtual public redis_command
{
public:
@ -30,6 +28,8 @@ public:
*/
redis_zset(redis_client_cluster* cluster);
redis_zset(redis_client_pipeline* pipeline);
ACL_CPP_DEPRECATED
redis_zset(redis_client_cluster* cluster, size_t max_conns);

View File

@ -44,6 +44,25 @@ redis::redis(redis_client_cluster* cluster)
{
}
redis::redis(redis_client_pipeline* pipeline)
: redis_command(pipeline)
, redis_connection(pipeline)
, redis_hash(pipeline)
, redis_hyperloglog(pipeline)
, redis_key(pipeline)
, redis_list(pipeline)
, redis_pubsub(pipeline)
, redis_script(pipeline)
, redis_server(pipeline)
, redis_set(pipeline)
, redis_string(pipeline)
, redis_transaction(pipeline)
, redis_zset(pipeline)
, redis_cluster(pipeline)
{
}
redis::redis(redis_client_cluster* cluster, size_t)
: redis_command(cluster)
, redis_connection(cluster)

View File

@ -29,6 +29,11 @@ redis_cluster::redis_cluster(redis_client_cluster* cluster)
{
}
redis_cluster::redis_cluster(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_cluster::redis_cluster(redis_client_cluster* cluster, size_t)
: redis_command(cluster)
{

View File

@ -30,6 +30,11 @@ redis_connection::redis_connection(redis_client_cluster* cluster, size_t)
{
}
redis_connection::redis_connection(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_connection::~redis_connection()
{
}

View File

@ -80,6 +80,11 @@ redis_geo::redis_geo(redis_client_cluster* cluster, size_t)
{
}
redis_geo::redis_geo(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_geo::~redis_geo()
{
}

View File

@ -33,6 +33,11 @@ redis_hash::redis_hash(redis_client_cluster* cluster, size_t)
{
}
redis_hash::redis_hash(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_hash::~redis_hash(void)
{
}

View File

@ -28,6 +28,11 @@ redis_hyperloglog::redis_hyperloglog(redis_client_cluster* cluster, size_t)
{
}
redis_hyperloglog::redis_hyperloglog(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_hyperloglog::~redis_hyperloglog()
{
}

View File

@ -34,6 +34,11 @@ redis_key::redis_key(redis_client_cluster* cluster, size_t)
{
}
redis_key::redis_key(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_key::~redis_key()
{
}

View File

@ -35,6 +35,11 @@ redis_list::redis_list(redis_client_cluster* cluster, size_t)
{
}
redis_list::redis_list(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_list::~redis_list()
{
}

View File

@ -31,6 +31,11 @@ redis_pubsub::redis_pubsub(redis_client_cluster* cluster, size_t)
{
}
redis_pubsub::redis_pubsub(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_pubsub::~redis_pubsub(void)
{
}

View File

@ -33,6 +33,11 @@ redis_script::redis_script(redis_client_cluster* cluster, size_t)
{
}
redis_script::redis_script(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_script::~redis_script()
{
}

View File

@ -32,6 +32,11 @@ redis_server::redis_server(redis_client_cluster* cluster, size_t)
{
}
redis_server::redis_server(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_server::~redis_server()
{
}

View File

@ -33,6 +33,11 @@ redis_set::redis_set(redis_client_cluster* cluster, size_t)
{
}
redis_set::redis_set(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_set::~redis_set()
{
}

View File

@ -33,6 +33,11 @@ redis_stream::redis_stream(redis_client_cluster* cluster, size_t)
{
}
redis_stream::redis_stream(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_stream::~redis_stream(void)
{
}

View File

@ -36,6 +36,11 @@ redis_string::redis_string(redis_client_cluster* cluster, size_t)
{
}
redis_string::redis_string(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_string::~redis_string()
{
}

View File

@ -30,6 +30,11 @@ redis_transaction::redis_transaction(redis_client_cluster* cluster, size_t)
{
}
redis_transaction::redis_transaction(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_transaction::~redis_transaction()
{
}

View File

@ -34,6 +34,11 @@ redis_zset::redis_zset(redis_client_cluster* cluster, size_t)
{
}
redis_zset::redis_zset(redis_client_pipeline* pipeline)
: redis_command(pipeline)
{
}
redis_zset::~redis_zset()
{
}