Logo RedisPubSub Project   v0.9.0
RedisPubSub is an utility with Publisher/Subscirber model based on Redis for J-PARC/MLF.
RedisSubscriber Class Reference

Subscriber using Redis Publisher/Subscriber Package. More...

#include <RedisPubSub.h>

Inheritance diagram for RedisSubscriber:
Collaboration diagram for RedisSubscriber:

Public Member Functions

 RedisSubscriber ()
 Redis context. More...
 
 RedisSubscriber (const string &host, int32_t port=6379)
 Constructor. More...
 
virtual ~RedisSubscriber ()
 Destructor. More...
 
void setHost (const string &host, int32_t port)
 Set host address of the broker. More...
 

Protected Attributes

string m_host
 
int32_t m_port
 Host IP address. More...
 
std::shared_ptr< redisContext > m_context
 Port number. More...
 

Detailed Description

Subscriber using Redis Publisher/Subscriber Package.

RedisSubscriber() is a superclass of RedisSyncSubscriber(), which subscribes data in Redis server(broker).

Constructor & Destructor Documentation

RedisSubscriber::RedisSubscriber ( )

Redis context.

Default constructor

RedisSubscriber::RedisSubscriber ( const string &  host,
int32_t  port = 6379 
)

Constructor.

Parameters
[in]hostHost IP address of the broker.
[in]portPort number of the broker.
RedisSubscriber::~RedisSubscriber ( )
virtual

Destructor.

Member Function Documentation

void RedisSubscriber::setHost ( const string &  host,
int32_t  port 
)

Set host address of the broker.

Parameters
[in]hostHost IP address of the broker.
[in]portPort number of the broker.

Field Documentation

std::shared_ptr<redisContext> RedisSubscriber::m_context
protected

Port number.

string RedisSubscriber::m_host
protected
int32_t RedisSubscriber::m_port
protected

Host IP address.


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