InfiniSQL
v0.1.2-alpha
Massive Scale Transaction Processing
|
collection of producers More...
#include <Mbox.h>
Classes | |
struct | location_s |
address and MboxProducer for an actor More... | |
Public Member Functions | |
Mboxes () | |
Mboxes (int64_t nodeidarg) | |
collection of producers More... | |
virtual | ~Mboxes () |
void | update (class Topology &top) |
update Topology of producers More... | |
void | update (class Topology &top, int64_t myActorid) |
update Topology of producers More... | |
void | toActor (const Topology::addressStruct &source, const Topology::addressStruct &dest, class Message &msg) |
produce Message for specific actor More... | |
void | toUserSchemaMgr (const Topology::addressStruct &source, class Message &msg) |
produce Message for replica's UserSchemaMgr More... | |
void | toDeadlockMgr (const Topology::addressStruct &source, class Message &msg) |
produce Message for replica's DeadlockMgr More... | |
void | toPartition (const Topology::addressStruct &source, int64_t partitionid, class Message &msg) |
produce Message for Engine associated with specific partition More... | |
int64_t | toAllOfType (actortypes_e type, const Topology::addressStruct &source, class Message &msg) |
int64_t | toAllOfTypeThisReplica (actortypes_e type, const Topology::addressStruct &source, class Message &msg) |
produce Message destined to all actors of type on current replica More... | |
void | sendObBatch () |
send batched Message objects destined to remote nodes More... | |
Public Attributes | |
int64_t | nodeid |
class MboxProducer | topologyMgr |
class MboxProducer | userSchemaMgr |
class MboxProducer | deadlockMgr |
class MboxProducer | listener |
class MboxProducer | obGateway |
class MboxProducer | ibGateway |
std::vector< class MboxProducer > | transactionAgents |
std::vector< class MboxProducer > | engines |
std::vector< class MboxProducer * > | actoridToProducers |
std::vector< class MboxProducer * > | transactionAgentPtrs |
std::vector< class MboxProducer * > | enginePtrs |
class MboxProducer * | topologyMgrPtr |
location_s | userSchemaMgrLocation |
location_s | deadlockMgrLocation |
class MboxProducer * | listenerPtr |
class MboxProducer * | obGatewayPtr |
std::vector< location_s > | partitionToProducers |
std::vector< vector< int > > | allActors |
boost::unordered_map< int16_t, std::vector< int > > | allActorsThisReplica |
collection of producers
This class lets each actor keep track of destinations in a consistent way
Mboxes::Mboxes | ( | int64_t | nodeidarg) |
collection of producers
nodeidarg | nodeid |
Definition at line 197 of file Mbox.cc.
References deadlockMgr, ibGateway, listener, MboxProducer::mbox, obGateway, topologyMgr, and userSchemaMgr.
void Mboxes::sendObBatch | ( | ) |
send batched Message objects destined to remote nodes
Definition at line 551 of file Mbox.cc.
References MboxProducer::obBatchMsg, obGatewayPtr, and MboxProducer::sendMsg().
Referenced by DeadlockMgr::DeadlockMgr(), Engine::Engine(), MboxProducer::sendMsg(), TransactionAgent::TransactionAgent(), and UserSchemaMgr::UserSchemaMgr().
void Mboxes::toActor | ( | const Topology::addressStruct & | source, |
const Topology::addressStruct & | dest, | ||
class Message & | msg | ||
) |
produce Message for specific actor
source | source address |
dest | destination address |
msg | Message |
Sends message by global actor address
Definition at line 347 of file Mbox.cc.
References Topology::addressStruct::actorid, actoridToProducers, Topology::addressStruct::nodeid, nodeid, obGatewayPtr, MboxProducer::sendMsg(), and Message::setEnvelope().
Referenced by Engine::apply(), Transaction::commit(), DeadlockMgr::deadlock(), TransactionAgent::handledispatch(), IbGateway::inbufhandler(), TransactionAgent::newprocedure(), UserSchemaMgr::operationHandler(), SubTransaction::replyTransaction(), toAllOfType(), toAllOfTypeThisReplica(), toDeadlockMgr(), and toUserSchemaMgr().
int64_t Mboxes::toAllOfType | ( | actortypes_e | type, |
const Topology::addressStruct & | source, | ||
class Message & | msg | ||
) |
produce Message destined to all actors of type
type | destination actor type |
source | source address |
msg | Message |
Definition at line 389 of file Mbox.cc.
References allActors, Message::messageStruct, PAYLOADCOMMITROLLBACK, PAYLOADDEADLOCK, PAYLOADMESSAGE, PAYLOADSOCKET, PAYLOADSUBTRANSACTION, Message::message_s::payloadtype, PAYLOADUSERSCHEMA, and toActor().
Referenced by TransactionAgent::addcolumn(), TransactionAgent::compile(), TransactionAgent::createtable(), and TransactionAgent::schemaBoilerplate().
int64_t Mboxes::toAllOfTypeThisReplica | ( | actortypes_e | type, |
const Topology::addressStruct & | source, | ||
class Message & | msg | ||
) |
produce Message destined to all actors of type on current replica
type | destination actor type |
source | source address |
msg | Mesage |
Definition at line 466 of file Mbox.cc.
References allActors, allActorsThisReplica, Message::messageStruct, PAYLOADCOMMITROLLBACK, PAYLOADDEADLOCK, PAYLOADMESSAGE, PAYLOADSOCKET, PAYLOADSUBTRANSACTION, Message::message_s::payloadtype, PAYLOADUSERSCHEMA, and toActor().
void Mboxes::toDeadlockMgr | ( | const Topology::addressStruct & | source, |
class Message & | msg | ||
) |
produce Message for replica's DeadlockMgr
source | source address |
msg | Message |
Definition at line 368 of file Mbox.cc.
References Mboxes::location_s::address, deadlockMgrLocation, and toActor().
Referenced by Transaction::abortCmd(), Transaction::checkLock(), and Transaction::checkSqlLock().
void Mboxes::toPartition | ( | const Topology::addressStruct & | source, |
int64_t | partitionid, | ||
class Message & | msg | ||
) |
produce Message for Engine associated with specific partition
source | source address |
partitionid | destination partition |
msg | Message |
Definition at line 374 of file Mbox.cc.
References Mboxes::location_s::address, Mboxes::location_s::destmbox, partitionToProducers, MboxProducer::sendMsg(), and Message::setEnvelope().
Referenced by Transaction::continueCommitTransaction(), TransactionAgent::handledispatch(), Transaction::rollback(), and Transaction::sendTransaction().
void Mboxes::toUserSchemaMgr | ( | const Topology::addressStruct & | source, |
class Message & | msg | ||
) |
produce Message for replica's UserSchemaMgr
source | source address |
msg | Message |
Definition at line 362 of file Mbox.cc.
References Mboxes::location_s::address, toActor(), and userSchemaMgrLocation.
Referenced by TransactionAgent::changepassword(), TransactionAgent::createdomain(), TransactionAgent::createuser(), TransactionAgent::deletedomain(), TransactionAgent::deleteuser(), TransactionAgent::login(), and TransactionAgent::schemaBoilerplate().
void Mboxes::update | ( | class Topology & | top) |
update Topology of producers
top | node's authoritative Topology |
Updates the set of MboxProducers based on updated Topology. Should be called by an actor after it receives a message from TopologyMgr that a change in nodeTopology has happened. Should be passed a Topology local to the actor.
Definition at line 220 of file Mbox.cc.
Referenced by TopologyMgr::broadcastConfig(), DeadlockMgr::DeadlockMgr(), Engine::Engine(), IbGateway::IbGateway(), Listener::Listener(), ObGateway::ObGateway(), TransactionAgent::TransactionAgent(), and UserSchemaMgr::UserSchemaMgr().
void Mboxes::update | ( | class Topology & | top, |
int64_t | myActorid | ||
) |
update Topology of producers
top | node's authoritative Topology |
myActorid | actorid for owning actor |
Definition at line 225 of file Mbox.cc.
References Topology::addressStruct::actorid, actoridToProducers, Topology::actorList, Mboxes::location_s::address, Topology::allActors, allActors, Topology::allActorsThisReplica, allActorsThisReplica, deadlockMgrLocation, Topology::deadlockMgrNode, Mboxes::location_s::destmbox, enginePtrs, listenerPtr, Topology::addressStruct::nodeid, Topology::nodeid, nodeTopology, nodeTopologyMutex, Topology::numengines, Topology::numobgateways, Topology::numpartitions, Topology::numtransactionagents, obGatewayPtr, Topology::partitionListThisReplica, partitionToProducers, topologyMgrPtr, transactionAgentPtrs, userSchemaMgrLocation, and Topology::userSchemaMgrNode.
std::vector<class MboxProducer *> Mboxes::actoridToProducers |
Definition at line 249 of file Mbox.h.
Referenced by TopologyMgr::broadcastConfig(), toActor(), and update().
std::vector< vector<int> > Mboxes::allActors |
Definition at line 260 of file Mbox.h.
Referenced by toAllOfType(), toAllOfTypeThisReplica(), and update().
boost::unordered_map< int16_t, std::vector<int> > Mboxes::allActorsThisReplica |
Definition at line 261 of file Mbox.h.
Referenced by toAllOfTypeThisReplica(), and update().
class MboxProducer Mboxes::deadlockMgr |
location_s Mboxes::deadlockMgrLocation |
Definition at line 254 of file Mbox.h.
Referenced by toDeadlockMgr(), and update().
std::vector<class MboxProducer *> Mboxes::enginePtrs |
std::vector<class MboxProducer> Mboxes::engines |
class MboxProducer Mboxes::ibGateway |
class MboxProducer Mboxes::listener |
class MboxProducer* Mboxes::listenerPtr |
int64_t Mboxes::nodeid |
Definition at line 237 of file Mbox.h.
Referenced by DeadlockMgr::DeadlockMgr(), Engine::Engine(), IbGateway::IbGateway(), Listener::Listener(), ObGateway::ObGateway(), toActor(), TransactionAgent::TransactionAgent(), and UserSchemaMgr::UserSchemaMgr().
class MboxProducer Mboxes::obGateway |
class MboxProducer* Mboxes::obGatewayPtr |
Definition at line 256 of file Mbox.h.
Referenced by sendObBatch(), toActor(), and update().
std::vector<location_s> Mboxes::partitionToProducers |
Definition at line 258 of file Mbox.h.
Referenced by toPartition(), and update().
class MboxProducer Mboxes::topologyMgr |
class MboxProducer* Mboxes::topologyMgrPtr |
std::vector<class MboxProducer *> Mboxes::transactionAgentPtrs |
Definition at line 250 of file Mbox.h.
Referenced by Listener::Listener(), and update().
std::vector<class MboxProducer> Mboxes::transactionAgents |
class MboxProducer Mboxes::userSchemaMgr |
location_s Mboxes::userSchemaMgrLocation |
Definition at line 253 of file Mbox.h.
Referenced by toUserSchemaMgr(), and update().