/* * * Created on: Mar 1, 2021 * Author: astrisw */ #ifndef REDISPROVIDER_H_ #define REDISPROVIDER_H_ #include #include #include #include class RedisProvider : public BaseProvider{ private: std::shared_ptr stream; std::string ip; std::string port; std::string & key = *(&this->dest); void setDest(std::string dest){setKey(dest);} std::string getDest(){return getKey();} public: RedisProvider(); RedisProvider(std::string ip, int port, std::string key); void setIp(std::string ip){this->ip=ip;} void setPort(std::string port){this->port=port;} void setKey(std::string key){this->key=key;} std::string getIp(){return this->ip;} std::string getPort(){return this->port;} std::string getKey(){return this->key;} int write(BasePacket &); int write(BasePacket &, std::string dest); int close(); int open(); ~RedisProvider(){ std::cout << "Deleting Redis stream" << std::endl; } }; #endif /* REDISPROVIDER_H_ */