acl  3.5.3.0
acl::redis_script类 参考

#include <redis_script.hpp>

+ 类 acl::redis_script 继承关系图:
+ acl::redis_script 的协作图:

Public 成员函数

 redis_script (void)
 
 redis_script (redis_client *conn)
 
 redis_script (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_script (redis_client_cluster *cluster, size_t max_conns)
 
 redis_script (redis_client_pipeline *pipeline)
 
virtual ~redis_script (void)
 
const redis_resulteval (const char *script, const std::vector< string > &keys, const std::vector< string > &args)
 
const redis_resulteval (const char *script, const std::vector< const char * > &keys, const std::vector< const char * > &args)
 
const redis_resultevalsha (const char *sha1, const std::vector< string > &keys, const std::vector< string > &args)
 
const redis_resultevalsha (const char *sha1, const std::vector< const char * > &keys, const std::vector< const char * > &args)
 
int script_exists (const std::vector< string > &scripts, std::vector< bool > &out)
 
int script_exists (const std::vector< const char * > &scripts, std::vector< bool > &out)
 
bool script_flush ()
 
bool script_load (const string &script, string &out)
 
bool script_kill ()
 
bool eval_status (const char *script, const std::vector< string > &keys, const std::vector< string > &args, const char *success="OK")
 
bool eval_number (const char *script, const std::vector< string > &keys, const std::vector< string > &args, int &out)
 
bool eval_number64 (const char *script, const std::vector< string > &keys, const std::vector< string > &args, long long int &out)
 
int eval_string (const char *script, const std::vector< string > &keys, const std::vector< string > &args, string &out)
 
bool evalsha_status (const char *script, const std::vector< string > &keys, const std::vector< string > &args, const char *success="OK")
 
bool evalsha_number (const char *script, const std::vector< string > &keys, const std::vector< string > &args, int &out)
 
bool evalsha_number64 (const char *script, const std::vector< string > &keys, const std::vector< string > &args, long long int &out)
 
int evalsha_string (const char *script, const std::vector< string > &keys, const std::vector< string > &args, string &out)
 
int eval_status (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< bool > &out, const char *success="OK")
 
int eval_number (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< int > &out, std::vector< bool > &status)
 
long long int eval_number64 (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< long long int > &out, std::vector< bool > &status)
 
int eval_strings (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< string > &out)
 
int evalsha_status (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< bool > &out, const char *success="OK")
 
int evalsha_number (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< int > &out, std::vector< bool > &status)
 
long long int evalsha_number64 (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< long long int > &out, std::vector< bool > &status)
 
int evalsha_strings (const char *script, const std::vector< string > &keys, const std::vector< string > &args, std::vector< string > &out)
 
- Public 成员函数 继承自 acl::redis_command
 redis_command (void)
 
 redis_command (redis_client *conn)
 
 redis_command (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED redis_command (redis_client_cluster *cluster, size_t max_conns)
 
 redis_command (redis_client_pipeline *pipeline)
 
virtual ~redis_command (void)
 
void set_check_addr (bool on)
 
void clear (bool save_slot=false)
 
void reset (bool save_slot=false)
 
void set_client (redis_client *conn)
 
redis_clientget_client (void) const
 
const char * get_client_addr (void) const
 
void set_cluster (redis_client_cluster *cluster)
 
ACL_CPP_DEPRECATED void set_cluster (redis_client_cluster *cluster, size_t max_conns)
 
redis_client_clusterget_cluster (void) const
 
void set_pipeline (redis_client_pipeline *pipeline, bool use_mbox=true)
 
redis_client_pipelineget_pipeline (void) const
 
dbuf_poolget_dbuf (void) const
 
redis_result_t result_type (void) const
 
const char * result_status (void) const
 
const char * result_error (void) const
 
size_t result_size (void) const
 
int result_number (bool *success=NULL) const
 
long long int result_number64 (bool *success=NULL) const
 
const char * get_result (size_t i, size_t *len=NULL) const
 
bool eof (void) const
 
const redis_resultget_result (void) const
 
const redis_resultresult_child (size_t i) const
 
const char * result_value (size_t i, size_t *len=NULL) const
 
void set_slice_request (bool on)
 
void set_slice_respond (bool on)
 
const redis_resultrequest (size_t argc, const char *argv[], size_t lens[], size_t nchild=0)
 
const redis_resultrequest (const std::vector< string > &args, size_t nchild=0)
 
const stringrequest_buf (void) const
 
void build_request (size_t argc, const char *argv[], size_t lens[])
 
void hash_slot (const char *key)
 
void hash_slot (const char *key, size_t len)
 
int get_slot (void) const
 
bool is_check_addr (void) const
 
const char * get_addr (const char *info)
 
void set_client_addr (const char *addr)
 
void set_client_addr (redis_client &conn)
 
redis_request * get_request_obj (void) const
 
stringget_request_buf (void) const
 
bool is_slice_req (void) const
 
redis_pipeline_messageget_pipeline_message (void)
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 acl::redis_command
static void build_request (size_t argc, const char *argv[], size_t lens[], string &out)
 
- Protected 成员函数 继承自 acl::redis_command
const redis_resultrun (size_t nchild=0, int *timeout=NULL)
 
void clear_request (void)
 
const redis_result ** scan_keys (const char *cmd, const char *key, int &cursor, size_t &size, const char *pattern, const size_t *count)
 
const redis_result ** scan_keys (const char *cmd, const char *key, size_t klen, int &cursor, size_t &size, const char *pattern, const size_t *count)
 
void build (const char *cmd, const char *key, const std::map< string, string > &attrs)
 
void build (const char *cmd, const char *key, size_t klen, const std::map< string, string > &attrs)
 
void build (const char *cmd, const char *key, const std::map< string, const char * > &attrs)
 
void build (const char *cmd, const char *key, const std::vector< string > &names, const std::vector< string > &values)
 
void build (const char *cmd, const char *key, size_t klen, const std::vector< string > &names, const std::vector< string > &values)
 
void build (const char *cmd, const char *key, const std::vector< const char * > &names, const std::vector< const char * > &values)
 
void build (const char *cmd, const char *key, const char *names[], const char *values[], size_t argc)
 
void build (const char *cmd, const char *key, const int names[], const char *values[], size_t argc)
 
void build (const char *cmd, const char *key, const char *names[], const size_t names_len[], const char *values[], const size_t values_len[], size_t argc)
 
void build (const char *cmd, const char *key, size_t klen, const char *names[], const size_t names_len[], const char *values[], const size_t values_len[], size_t argc)
 
void build (const char *cmd, const char *key, const std::vector< string > &names)
 
void build (const char *cmd, const char *key, size_t klen, const std::vector< string > &names)
 
void build (const char *cmd, const char *key, const std::vector< const char * > &names)
 
void build (const char *cmd, const char *key, const std::vector< int > &names)
 
void build (const char *cmd, const char *key, const char *names[], size_t argc)
 
void build (const char *cmd, const char *key, const char *names[], const size_t lens[], size_t argc)
 
void build (const char *cmd, const char *key, size_t klen, const char *names[], const size_t lens[], size_t argc)
 
void build (const char *cmd, const char *key, const int names[], size_t argc)
 
int get_number (bool *success=NULL)
 
long long int get_number64 (bool *success=NULL)
 
int get_number (std::vector< int > &out)
 
int get_number64 (std::vector< long long int > &out)
 
bool check_status (const char *success="OK")
 
int get_status (std::vector< bool > &out)
 
const char * get_status (void)
 
int get_string (string &buf)
 
int get_string (string *buf)
 
int get_string (char *buf, size_t size)
 
int get_strings (std::vector< string > &result)
 
int get_strings (std::vector< string > *result)
 
int get_strings (std::list< string > &result)
 
int get_strings (std::list< string > *result)
 
int get_strings (std::map< string, string > &result)
 
int get_strings (std::vector< string > &names, std::vector< string > &values)
 
int get_strings (std::vector< const char * > &names, std::vector< const char * > &values)
 
void argv_space (size_t n)
 
void build_request1 (size_t argc, const char *argv[], size_t lens[])
 
void build_request2 (size_t argc, const char *argv[], size_t lens[])
 
void logger_result (const redis_result *result)
 
- Protected 成员函数 继承自 acl::acl::noncopyable
 noncopyable ()
 
 ~noncopyable ()
 
- Protected 属性 继承自 acl::redis_command
dbuf_pooldbuf_
 
bool check_addr_
 
char addr_ [32]
 
redis_clientconn_
 
redis_client_clustercluster_
 
redis_client_pipelinepipeline_
 
bool pipe_use_mbox_
 
int slot_
 
int redirect_max_
 
int redirect_sleep_
 
bool slice_req_
 
stringrequest_buf_
 
redis_request * request_obj_
 
size_t argv_size_
 
const char ** argv_
 
size_t * argv_lens_
 
size_t argc_
 
bool slice_res_
 
redis_pipeline_messagepipe_msg_
 
const redis_resultresult_
 

详细描述

在文件 redis_script.hpp12 行定义.

构造及析构函数说明

◆ redis_script() [1/5]

acl::redis_script::redis_script ( void  )

◆ redis_script() [2/5]

acl::redis_script::redis_script ( redis_client conn)

◆ redis_script() [3/5]

acl::redis_script::redis_script ( redis_client_cluster cluster)

◆ redis_script() [4/5]

ACL_CPP_DEPRECATED acl::redis_script::redis_script ( redis_client_cluster cluster,
size_t  max_conns 
)

◆ redis_script() [5/5]

acl::redis_script::redis_script ( redis_client_pipeline pipeline)

◆ ~redis_script()

virtual acl::redis_script::~redis_script ( void  )
virtual

成员函数说明

◆ eval() [1/2]

const redis_result* acl::redis_script::eval ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args 
)

◆ eval() [2/2]

const redis_result* acl::redis_script::eval ( const char *  script,
const std::vector< const char * > &  keys,
const std::vector< const char * > &  args 
)

◆ eval_number() [1/2]

bool acl::redis_script::eval_number ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
int &  out 
)

◆ eval_number() [2/2]

int acl::redis_script::eval_number ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
std::vector< int > &  out,
std::vector< bool > &  status 
)

◆ eval_number64() [1/2]

bool acl::redis_script::eval_number64 ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
long long int &  out 
)

◆ eval_number64() [2/2]

long long int acl::redis_script::eval_number64 ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
std::vector< long long int > &  out,
std::vector< bool > &  status 
)

◆ eval_status() [1/2]

bool acl::redis_script::eval_status ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
const char *  success = "OK" 
)

◆ eval_status() [2/2]

int acl::redis_script::eval_status ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
std::vector< bool > &  out,
const char *  success = "OK" 
)

◆ eval_string()

int acl::redis_script::eval_string ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
string out 
)

◆ eval_strings()

int acl::redis_script::eval_strings ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
std::vector< string > &  out 
)

◆ evalsha() [1/2]

const redis_result* acl::redis_script::evalsha ( const char *  sha1,
const std::vector< string > &  keys,
const std::vector< string > &  args 
)

◆ evalsha() [2/2]

const redis_result* acl::redis_script::evalsha ( const char *  sha1,
const std::vector< const char * > &  keys,
const std::vector< const char * > &  args 
)

◆ evalsha_number() [1/2]

bool acl::redis_script::evalsha_number ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
int &  out 
)

◆ evalsha_number() [2/2]

int acl::redis_script::evalsha_number ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
std::vector< int > &  out,
std::vector< bool > &  status 
)

◆ evalsha_number64() [1/2]

bool acl::redis_script::evalsha_number64 ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
long long int &  out 
)

◆ evalsha_number64() [2/2]

long long int acl::redis_script::evalsha_number64 ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
std::vector< long long int > &  out,
std::vector< bool > &  status 
)

◆ evalsha_status() [1/2]

bool acl::redis_script::evalsha_status ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
const char *  success = "OK" 
)

◆ evalsha_status() [2/2]

int acl::redis_script::evalsha_status ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
std::vector< bool > &  out,
const char *  success = "OK" 
)

◆ evalsha_string()

int acl::redis_script::evalsha_string ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
string out 
)

◆ evalsha_strings()

int acl::redis_script::evalsha_strings ( const char *  script,
const std::vector< string > &  keys,
const std::vector< string > &  args,
std::vector< string > &  out 
)

◆ script_exists() [1/2]

int acl::redis_script::script_exists ( const std::vector< string > &  scripts,
std::vector< bool > &  out 
)

◆ script_exists() [2/2]

int acl::redis_script::script_exists ( const std::vector< const char * > &  scripts,
std::vector< bool > &  out 
)

◆ script_flush()

bool acl::redis_script::script_flush ( )

◆ script_kill()

bool acl::redis_script::script_kill ( )

◆ script_load()

bool acl::redis_script::script_load ( const string script,
string out 
)

该类的文档由以下文件生成: