InfiniSQL  v0.1.2-alpha
Massive Scale Transaction Processing
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Topology Class Reference

#include <Topology.h>

Collaboration diagram for Topology:

Classes

struct  actor_s
 characteristics for each actor More...
 
struct  addressStruct
 
struct  partitionAddress
 

Public Member Functions

 Topology ()
 
 Topology (const Topology &orig)
 
virtual ~Topology ()
 
partitionAddressnewActor (actortypes_e type, class Mbox *mbox, int epollfd, const string &argstring, int64_t actorid, const vector< string > &nodes, const vector< string > &services)
 creates a new actor's addressing in the local node More...
 

Public Attributes

int16_t nodeid
 
int numreplicas
 
int activereplica
 
size_t numtransactionagents
 
size_t numengines
 
size_t numobgateways
 
vector< actor_sactorList
 
int16_t numpartitions
 
int16_t userSchemaMgrNode
 
class MboxuserSchemaMgrMbox
 
int16_t deadlockMgrNode
 
class MboxdeadlockMgrMbox
 
std::vector< vector
< partitionAddress > > 
partitionList
 
std::vector< partitionAddresspartitionListThisReplica
 
std::map< int64_t, vector
< std::string > > 
ibGateways
 
std::vector< vector< int > > allActors
 
boost::unordered_map< int16_t,
std::vector< int > > 
allActorsThisReplica
 
std::vector< vector< int16_t > > replicaMembers
 
std::vector< vector< int16_t > > tas
 

Detailed Description

topology definition and functions to set and query topology attributes

Definition at line 54 of file Topology.h.

Constructor & Destructor Documentation

Topology::Topology ( )

Definition at line 33 of file Topology.cc.

Topology::Topology ( const Topology orig)

Definition at line 40 of file Topology.cc.

40  : nodeid (), numreplicas (),
41  activereplica (),
43  numengines (),
44  numobgateways (),
45  numpartitions (),
48  deadlockMgrNode (),
50 {
51 }
Topology::~Topology ( )
virtual

Definition at line 53 of file Topology.cc.

54 {
55 }

Member Function Documentation

Topology::partitionAddress * Topology::newActor ( actortypes_e  type,
class Mbox mbox,
int  epollfd,
const string &  argstring,
int64_t  actorid,
const vector< string > &  nodes,
const vector< string > &  services 
)

creates a new actor's addressing in the local node

creates a new actor's addressing in the local node. Should be followed by launching the thread should be followed by launching the thread

Parameters
typeactor type
mboxMbox
epollfdepoll descriptor
argstringargument field for some actors to use
actoridactorid
nodes
services
Returns

Definition at line 57 of file Topology.cc.

References Topology::addressStruct::actorid, Topology::partitionAddress::address, Topology::partitionAddress::argstring, Topology::partitionAddress::epollfd, logfile, Topology::partitionAddress::mbox, Topology::addressStruct::nodeid, nodeid, Topology::partitionAddress::nodes, Topology::partitionAddress::services, and Topology::partitionAddress::type.

Referenced by TopologyMgr::TopologyMgr().

63 {
64  partitionAddress *addr = new partitionAddress();
65  if (addr==NULL)
66  {
67  fprintf(logfile, "%s %i can't create addr\n", __FILE__, __LINE__);
68  exit(1);
69  }
70  partitionAddress &addrRef = *addr;
71  addrRef.type = type;
72  addrRef.mbox = mbox;
73  addrRef.address.nodeid = nodeid;
74  addrRef.address.actorid = actorid;
75  addrRef.epollfd = epollfd;
76  addrRef.nodes = nodes;
77  addrRef.services = services;
78  addrRef.argstring = argstring;
79 
80  return addr;
81 }

Here is the caller graph for this function:

Member Data Documentation

int Topology::activereplica

Definition at line 124 of file Topology.h.

Referenced by TopologyMgr::updateGlobalConfig().

std::vector< vector<int> > Topology::allActors
boost::unordered_map< int16_t, std::vector<int> > Topology::allActorsThisReplica

Definition at line 145 of file Topology.h.

Referenced by Mboxes::update(), and TopologyMgr::updateGlobalConfig().

class Mbox* Topology::deadlockMgrMbox

Definition at line 138 of file Topology.h.

Referenced by TopologyMgr::updateGlobalConfig().

int16_t Topology::deadlockMgrNode

Definition at line 137 of file Topology.h.

Referenced by Mboxes::update(), and TopologyMgr::updateGlobalConfig().

std::map< int64_t, vector<std::string> > Topology::ibGateways

Definition at line 142 of file Topology.h.

Referenced by TopologyMgr::updateGlobalConfig(), and ObGateway::updateRemoteGateways().

int16_t Topology::nodeid
size_t Topology::numengines
size_t Topology::numobgateways

Definition at line 129 of file Topology.h.

Referenced by Mboxes::update(), and TopologyMgr::updateLocalConfig().

int Topology::numreplicas
size_t Topology::numtransactionagents
std::vector< vector<partitionAddress> > Topology::partitionList

Definition at line 140 of file Topology.h.

Referenced by TopologyMgr::updateGlobalConfig().

std::vector<partitionAddress> Topology::partitionListThisReplica
std::vector< vector<int16_t> > Topology::replicaMembers
std::vector< vector<int16_t> > Topology::tas
class Mbox* Topology::userSchemaMgrMbox

Definition at line 136 of file Topology.h.

Referenced by TopologyMgr::updateGlobalConfig().

int16_t Topology::userSchemaMgrNode

Definition at line 135 of file Topology.h.

Referenced by Mboxes::update(), and TopologyMgr::updateGlobalConfig().


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