ZeroSDN Controller  1.0
A modular distributed Software-Defined Network Controller
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros
CassandraClient Class Reference

This is the Cassandra Client which is used to create a connection to cassandra db. More...

#include <CassandraClient.h>

Public Member Functions

CassSession * getSession ()
 
CassError connect (const std::string nodes)
 
CassError createSchema ()
 
CassError insertLogMsg (const zmf::data::ZmfMessage &message, const zmf::data::ModuleUniqueId &sender)
 
void close ()
 

Public Attributes

Poco::Logger * loggerRef_
 

Protected Attributes

Poco::Logger & logger = zmf::logging::ZmfLogging::getLogger("Cassandra Client")
 

Detailed Description

This is the Cassandra Client which is used to create a connection to cassandra db.

All ZMF Events (only the pub/sub ones) will be stored in the database. We use the Apache Cassandra DB in latest version (2.1.x). To create a connection to cassandra db, you have to install the cassandra db driver on your system!

Author
Rainer Erban

Member Function Documentation

void CassandraClient::close ( )

Close the connection to cassandra db.

CassError CassandraClient::connect ( const std::string  nodes)

Connects client to cassandra db

Parameters
nodesa list of nodes to connect with
Returns
A CassError which should be CASS_OK if the client is connected.
CassError CassandraClient::createSchema ( )

Creates the Schema on cassandra db, if not exits

Returns
A CassError which should be CASS_OK if schema is created successfully.
CassSession* CassandraClient::getSession ( )
inline
Returns
the current session, necessary for a connection to cassandra db
CassError CassandraClient::insertLogMsg ( const zmf::data::ZmfMessage &  message,
const zmf::data::ModuleUniqueId &  sender 
)

Inserts a ZmfMessage} to the cassandra db. Attention: the payload will be ignored.

Parameters
messagethe ZmfMessage}
senderthe ModuleUniqueId} which is the module type id and module instance id

Member Data Documentation

Poco::Logger& CassandraClient::logger = zmf::logging::ZmfLogging::getLogger("Cassandra Client")
protected
Returns
reference to poco logger
Poco::Logger* CassandraClient::loggerRef_

The reference to poco logger


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