OpenSDN source code
ConfigCassandraPartition Class Reference

#include <config_cassandra_client.h>

Collaboration diagram for ConfigCassandraPartition:

Classes

struct  cmp_json_key
 
struct  FieldTimeStampInfo
 
class  ObjCacheEntry
 
struct  ObjectProcessRequestType
 

Public Types

typedef boost::shared_ptr< WorkQueue< ObjectProcessReq * > > ObjProcessWorkQType
 
typedef std::map< JsonAdapterDataType, FieldTimeStampInfo, cmp_json_keyFieldDetailMap
 
typedef boost::ptr_map< std::string, ObjCacheEntryObjectCacheMap
 

Public Member Functions

 ConfigCassandraPartition (ConfigCassandraClient *client, size_t idx)
 
virtual ~ConfigCassandraPartition ()
 
ObjProcessWorkQType obj_process_queue ()
 
virtual int UUIDRetryTimeInMSec (const ObjCacheEntry *obj) const
 
ObjCacheEntryGetObjCacheEntry (const std::string &uuid)
 
const ObjCacheEntryGetObjCacheEntry (const std::string &uuid) const
 
bool StoreKeyIfUpdated (const std::string &uuid, JsonAdapterDataType *adapter, uint64_t timestamp, ConfigCassandraParseContext &context)
 
void ListMapPropReviseUpdateList (const std::string &uuid, ConfigCassandraParseContext &context)
 
ObjCacheEntryMarkCacheDirty (const std::string &uuid)
 
void DeleteCacheMap (const std::string &uuid)
 
void Enqueue (ObjectProcessReq *req)
 
bool UUIDToObjCacheShow (const std::string &search_string, const std::string &last_uuid, uint32_t num_entries, std::vector< ConfigDBUUIDCacheEntry > *entries) const
 
int GetInstanceId () const
 
boost::asio::io_context * ioservice ()
 
bool IsListOrMapPropEmpty (const string &uuid_key, const string &lookup_key)
 
bool IsTaskTriggered () const
 

Static Public Attributes

static const uint32_t kMaxUUIDRetryTimePowOfTwo = 20
 
static const uint32_t kMinUUIDRetryTimeMSec = 100
 

Protected Member Functions

virtual bool ReadObjUUIDTable (const std::set< std::string > &uuid_list)
 
bool ProcessObjUUIDTableEntry (const std::string &uuid_key, const GenDb::ColList &col_list)
 
virtual void ParseObjUUIDTableEntry (const std::string &uuid, const GenDb::ColList &col_list, CassColumnKVVec *cass_data_vec, ConfigCassandraParseContext &context)
 
void ParseObjUUIDTableEachColumnBuildContext (const std::string &uuid, const std::string &key, const std::string &value, uint64_t timestamp, CassColumnKVVec *cass_data_vec, ConfigCassandraParseContext &context)
 
virtual void HandleObjectDelete (const string &uuid, bool add_change)
 
ConfigCassandraClientclient ()
 

Private Types

typedef std::map< std::string, ObjectProcessRequestType * > UUIDProcessSet
 

Private Member Functions

bool RequestHandler (ObjectProcessReq *req)
 
void AddUUIDToRequestList (const std::string &oper, const std::string &obj_type, const std::string &uuid_str)
 
bool ConfigReader ()
 
void RemoveObjReqEntries (std::set< std::string > &req_list)
 
void RemoveObjReqEntry (std::string &uuid)
 
virtual void GenerateAndPushJson (const string &uuid_key, const string &obj_type, const CassColumnKVVec &cass_data_vec, bool add_change)
 
void FillUUIDToObjCacheInfo (const std::string &uuid, ObjectCacheMap::const_iterator uuid_iter, ConfigDBUUIDCacheEntry *entry) const
 

Private Attributes

ObjProcessWorkQType obj_process_queue_
 
UUIDProcessSet uuid_read_set_
 
ObjectCacheMap object_cache_map_
 
boost::shared_ptr< TaskTriggerconfig_reader_
 
ConfigCassandraClientconfig_client_
 
int worker_id_
 

Friends

class ConfigCassandraClient
 

Detailed Description

Definition at line 36 of file config_cassandra_client.h.

Member Typedef Documentation

◆ FieldDetailMap

◆ ObjectCacheMap

typedef boost::ptr_map<std::string, ObjCacheEntry> ConfigCassandraPartition::ObjectCacheMap

Definition at line 94 of file config_cassandra_client.h.

◆ ObjProcessWorkQType

Definition at line 42 of file config_cassandra_client.h.

◆ UUIDProcessSet

typedef std::map<std::string, ObjectProcessRequestType *> ConfigCassandraPartition::UUIDProcessSet
private

Definition at line 154 of file config_cassandra_client.h.

Constructor & Destructor Documentation

◆ ConfigCassandraPartition()

ConfigCassandraPartition::ConfigCassandraPartition ( ConfigCassandraClient client,
size_t  idx 
)

Definition at line 589 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ ~ConfigCassandraPartition()

ConfigCassandraPartition::~ConfigCassandraPartition ( )
virtual

Definition at line 603 of file config_cassandra_client.cc.

Member Function Documentation

◆ AddUUIDToRequestList()

void ConfigCassandraPartition::AddUUIDToRequestList ( const std::string &  oper,
const std::string &  obj_type,
const std::string &  uuid_str 
)
private

Definition at line 617 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ client()

ConfigCassandraClient* ConfigCassandraPartition::client ( )
inlineprotected

Definition at line 138 of file config_cassandra_client.h.

◆ ConfigReader()

bool ConfigCassandraPartition::ConfigReader ( )
private

Definition at line 727 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ DeleteCacheMap()

void ConfigCassandraPartition::DeleteCacheMap ( const std::string &  uuid)
inline

Definition at line 110 of file config_cassandra_client.h.

◆ Enqueue()

void ConfigCassandraPartition::Enqueue ( ObjectProcessReq req)

Definition at line 607 of file config_cassandra_client.cc.

◆ FillUUIDToObjCacheInfo()

void ConfigCassandraPartition::FillUUIDToObjCacheInfo ( const std::string &  uuid,
ObjectCacheMap::const_iterator  uuid_iter,
ConfigDBUUIDCacheEntry *  entry 
) const
private

Definition at line 1040 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ GenerateAndPushJson()

void ConfigCassandraPartition::GenerateAndPushJson ( const string &  uuid_key,
const string &  obj_type,
const CassColumnKVVec cass_data_vec,
bool  add_change 
)
privatevirtual

Definition at line 368 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ GetInstanceId()

int ConfigCassandraPartition::GetInstanceId ( ) const
inline

Definition at line 120 of file config_cassandra_client.h.

◆ GetObjCacheEntry() [1/2]

ObjCacheEntry* ConfigCassandraPartition::GetObjCacheEntry ( const std::string &  uuid)

◆ GetObjCacheEntry() [2/2]

const ObjCacheEntry* ConfigCassandraPartition::GetObjCacheEntry ( const std::string &  uuid) const

◆ HandleObjectDelete()

void ConfigCassandraPartition::HandleObjectDelete ( const string &  uuid,
bool  add_change 
)
protectedvirtual

Definition at line 636 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ ioservice()

boost::asio::io_context * ConfigCassandraPartition::ioservice ( )

Definition at line 798 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ IsListOrMapPropEmpty()

bool ConfigCassandraPartition::IsListOrMapPropEmpty ( const string &  uuid_key,
const string &  lookup_key 
)

Definition at line 696 of file config_cassandra_client.cc.

◆ IsTaskTriggered()

bool ConfigCassandraPartition::IsTaskTriggered ( ) const

Definition at line 723 of file config_cassandra_client.cc.

◆ ListMapPropReviseUpdateList()

void ConfigCassandraPartition::ListMapPropReviseUpdateList ( const std::string &  uuid,
ConfigCassandraParseContext context 
)

Definition at line 891 of file config_cassandra_client.cc.

◆ MarkCacheDirty()

ConfigCassandraPartition::ObjCacheEntry * ConfigCassandraPartition::MarkCacheDirty ( const std::string &  uuid)

Definition at line 1019 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ obj_process_queue()

ObjProcessWorkQType ConfigCassandraPartition::obj_process_queue ( )
inline

Definition at line 96 of file config_cassandra_client.h.

◆ ParseObjUUIDTableEachColumnBuildContext()

void ConfigCassandraPartition::ParseObjUUIDTableEachColumnBuildContext ( const std::string &  uuid,
const std::string &  key,
const std::string &  value,
uint64_t  timestamp,
CassColumnKVVec cass_data_vec,
ConfigCassandraParseContext context 
)
protected

Definition at line 356 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ ParseObjUUIDTableEntry()

void ConfigCassandraPartition::ParseObjUUIDTableEntry ( const std::string &  uuid,
const GenDb::ColList col_list,
CassColumnKVVec cass_data_vec,
ConfigCassandraParseContext context 
)
protectedvirtual

Definition at line 330 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ ProcessObjUUIDTableEntry()

bool ConfigCassandraPartition::ProcessObjUUIDTableEntry ( const std::string &  uuid_key,
const GenDb::ColList col_list 
)
protected

Definition at line 273 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ ReadObjUUIDTable()

bool ConfigCassandraPartition::ReadObjUUIDTable ( const std::set< std::string > &  uuid_list)
protectedvirtual

Definition at line 153 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ RemoveObjReqEntries()

void ConfigCassandraPartition::RemoveObjReqEntries ( std::set< std::string > &  req_list)
private

Definition at line 783 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ RemoveObjReqEntry()

void ConfigCassandraPartition::RemoveObjReqEntry ( std::string &  uuid)
private

Definition at line 790 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ RequestHandler()

bool ConfigCassandraPartition::RequestHandler ( ObjectProcessReq req)
private

Definition at line 611 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ StoreKeyIfUpdated()

bool ConfigCassandraPartition::StoreKeyIfUpdated ( const std::string &  uuid,
JsonAdapterDataType adapter,
uint64_t  timestamp,
ConfigCassandraParseContext context 
)

Definition at line 919 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ UUIDRetryTimeInMSec()

int ConfigCassandraPartition::UUIDRetryTimeInMSec ( const ObjCacheEntry obj) const
virtual

Definition at line 818 of file config_cassandra_client.cc.

Here is the call graph for this function:

◆ UUIDToObjCacheShow()

bool ConfigCassandraPartition::UUIDToObjCacheShow ( const std::string &  search_string,
const std::string &  last_uuid,
uint32_t  num_entries,
std::vector< ConfigDBUUIDCacheEntry > *  entries 
) const

Definition at line 1064 of file config_cassandra_client.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ ConfigCassandraClient

friend class ConfigCassandraClient
friend

Definition at line 141 of file config_cassandra_client.h.

Member Data Documentation

◆ config_client_

ConfigCassandraClient* ConfigCassandraPartition::config_client_
private

Definition at line 174 of file config_cassandra_client.h.

◆ config_reader_

boost::shared_ptr<TaskTrigger> ConfigCassandraPartition::config_reader_
private

Definition at line 173 of file config_cassandra_client.h.

◆ kMaxUUIDRetryTimePowOfTwo

const uint32_t ConfigCassandraPartition::kMaxUUIDRetryTimePowOfTwo = 20
static

Definition at line 92 of file config_cassandra_client.h.

◆ kMinUUIDRetryTimeMSec

const uint32_t ConfigCassandraPartition::kMinUUIDRetryTimeMSec = 100
static

Definition at line 93 of file config_cassandra_client.h.

◆ obj_process_queue_

ObjProcessWorkQType ConfigCassandraPartition::obj_process_queue_
private

Definition at line 170 of file config_cassandra_client.h.

◆ object_cache_map_

ObjectCacheMap ConfigCassandraPartition::object_cache_map_
private

Definition at line 172 of file config_cassandra_client.h.

◆ uuid_read_set_

UUIDProcessSet ConfigCassandraPartition::uuid_read_set_
private

Definition at line 171 of file config_cassandra_client.h.

◆ worker_id_

int ConfigCassandraPartition::worker_id_
private

Definition at line 175 of file config_cassandra_client.h.


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