Covalent Bond  0.0.1-alpha
'covalent bond' is a data middle office. As a 2022-2023 Fall SWE final project.
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
trivial::cbRedisDevice Struct Referencefinal

#include <cbVirtualDevice.hpp>

Inheritance diagram for trivial::cbRedisDevice:
Inheritance graph
[legend]
Collaboration diagram for trivial::cbRedisDevice:
Collaboration graph
[legend]

Public Member Functions

 ~cbRedisDevice ()
 
 cbRedisDevice (int32_t idx)
 
 cbRedisDevice (int32_t idx, const std::string &_port, const std::string &_host, const std::string &_userName, const std::string &_passWord, int32_t dbnum, bool isSsl=false)
 
void updateUrl () override final
 
WFRedisTask * set (const std::vector< std::string > &params, const redis_callback &callback_func=nullptr, void *usrData=nullptr, int32_t retryTimes=3)
 
WFRedisTask * get (const std::vector< std::string > &params, const redis_callback &callback_func=nullptr, void *usrData=nullptr, int32_t retryTimes=3)
 
WFRedisTask * exists (const std::vector< std::string > &params, const redis_callback &callback_func=nullptr, void *usrData=nullptr, int32_t retryTimes=3)
 
- Public Member Functions inherited from trivial::cbVirtualDevice
 cbVirtualDevice ()=default
 
 cbVirtualDevice (const std::string &_port, const std::string &_host, const std::string &_userName, const std::string &_passWord, const std::string &_charSet, const std::string _dataBaseName, const virtualDeviceType &v)
 
void reloadConnection (const std::string &_port, const std::string &_host, const std::string &_userName, const std::string &_passWord, const std::string &_charSet, const std::string &_dataBaseName)
 

Static Public Member Functions

static void execMain (WFRedisTask *task)
 User should not use this function. All task should be added to graph node in order to execute all task that follows DAG flow. THIS FUNCTION JUST FOR TEST. More...
 

Private Attributes

bool m_isSSL = false
 
int32_t m_dbnum = 0
 
int32_t m_idx = 0
 

Additional Inherited Members

- Public Attributes inherited from trivial::cbVirtualDevice
virtualDeviceType deviceType = virtualDeviceType::MySql
 
std::string port
 
std::string host
 
std::string usrName
 
std::string passWord
 
std::string charSet
 
std::string dataBaseName
 
std::string Url
 

Detailed Description

Definition at line 178 of file cbVirtualDevice.hpp.

Constructor & Destructor Documentation

◆ ~cbRedisDevice()

trivial::cbRedisDevice::~cbRedisDevice ( )
inline

Definition at line 179 of file cbVirtualDevice.hpp.

◆ cbRedisDevice() [1/2]

trivial::cbRedisDevice::cbRedisDevice ( int32_t  idx)
inline

Definition at line 180 of file cbVirtualDevice.hpp.

◆ cbRedisDevice() [2/2]

trivial::cbRedisDevice::cbRedisDevice ( int32_t  idx,
const std::string &  _port,
const std::string &  _host,
const std::string &  _userName,
const std::string &  _passWord,
int32_t  dbnum,
bool  isSsl = false 
)
inline

Definition at line 181 of file cbVirtualDevice.hpp.

References trivial::Redis, and trivial::cbMySqlDevice::updateUrl().

Here is the call graph for this function:

Member Function Documentation

◆ execMain()

void trivial::cbRedisDevice::execMain ( WFRedisTask *  task)
static

User should not use this function. All task should be added to graph node in order to execute all task that follows DAG flow. THIS FUNCTION JUST FOR TEST.

Parameters
task

Definition at line 104 of file cbVirtualDevice.cpp.

◆ exists()

WFRedisTask * trivial::cbRedisDevice::exists ( const std::vector< std::string > &  params,
const redis_callback callback_func = nullptr,
void *  usrData = nullptr,
int32_t  retryTimes = 3 
)
Parameters
params
callback_func
usrData
retryTimes
Returns
WFRedisTask*

Definition at line 94 of file cbVirtualDevice.cpp.

References trivial::cbVirtualDevice::Url.

◆ get()

WFRedisTask * trivial::cbRedisDevice::get ( const std::vector< std::string > &  params,
const redis_callback callback_func = nullptr,
void *  usrData = nullptr,
int32_t  retryTimes = 3 
)
Parameters
params
callback_func
usrData
retryTimes
Returns
WFRedisTask*

Definition at line 84 of file cbVirtualDevice.cpp.

References trivial::cbVirtualDevice::Url.

◆ set()

WFRedisTask * trivial::cbRedisDevice::set ( const std::vector< std::string > &  params,
const redis_callback callback_func = nullptr,
void *  usrData = nullptr,
int32_t  retryTimes = 3 
)
Parameters
params
callback_func
usrData
retryTimes
Returns
WFRedisTask*

Definition at line 74 of file cbVirtualDevice.cpp.

References trivial::cbVirtualDevice::Url.

Referenced by cb::graph::cbRedisCachingNode::_generateSetTask().

Here is the caller graph for this function:

◆ updateUrl()

void trivial::cbRedisDevice::updateUrl ( )
finaloverridevirtual

Member Data Documentation

◆ m_dbnum

int32_t trivial::cbRedisDevice::m_dbnum = 0
private

Definition at line 244 of file cbVirtualDevice.hpp.

Referenced by updateUrl().

◆ m_idx

int32_t trivial::cbRedisDevice::m_idx = 0
private

Definition at line 245 of file cbVirtualDevice.hpp.

◆ m_isSSL

bool trivial::cbRedisDevice::m_isSSL = false
private

Definition at line 243 of file cbVirtualDevice.hpp.

Referenced by updateUrl().


The documentation for this struct was generated from the following files: