#include <DispatcherServer.h>
|
| DispatcherServer (PDBLoggerPtr logger, std::shared_ptr< StatisticsDB > statisticsDB) |
|
| ~DispatcherServer () |
|
void | initialize () |
|
void | registerHandlers (PDBServer &forMe) override |
|
void | registerStorageNodes (Handle< Vector< Handle< NodeDispatcherData >>> storageNodes) |
|
void | registerSet (std::pair< std::string, std::string > setAndDatabase, PartitionPolicyPtr partitionPolicy) |
|
bool | dispatchData (std::pair< std::string, std::string > setAndDatabase, std::string type, Handle< Vector< Handle< Object >>> toDispatch) |
|
bool | dispatchBytes (std::pair< std::string, std::string > setAndDatabase, std::string type, char *bytes, size_t numBytes) |
|
void | waitAllRequestsProcessed () |
|
virtual void | cleanup () |
|
template<class Functionality > |
Functionality & | getFunctionality () |
|
void | recordServer (PDBServer &recordMe) |
|
PDBWorkerPtr | getWorker () |
|
PDBLoggerPtr | getLogger () |
|
|
bool | validateTypes (const std::string &databaseName, const std::string &setName, const std::string &typeName, std::string &errMsg) |
|
bool | sendData (std::pair< std::string, std::string > setAndDatabase, std::string type, Handle< NodeDispatcherData > destination, Handle< Vector< Handle< Object >>> toSend) |
|
bool | sendBytes (std::pair< std::string, std::string > setAndDatabase, std::string type, Handle< NodeDispatcherData > destination, char *bytes, size_t numBytes) |
|
Handle< NodeDispatcherData > | findNode (NodeID nodeId) |
|
Definition at line 50 of file DispatcherServer.h.
pdb::DispatcherServer::~DispatcherServer |
( |
| ) |
|
bool pdb::DispatcherServer::dispatchBytes |
( |
std::pair< std::string, std::string > |
setAndDatabase, |
|
|
std::string |
type, |
|
|
char * |
bytes, |
|
|
size_t |
numBytes |
|
) |
| |
bool pdb::DispatcherServer::dispatchData |
( |
std::pair< std::string, std::string > |
setAndDatabase, |
|
|
std::string |
type, |
|
|
Handle< Vector< Handle< Object >>> |
toDispatch |
|
) |
| |
Dispatch a Vector of pdb::Object's to the correct StorageNodes as defined by that particular set's ParitionPolicy
- Parameters
-
setAndDatabase | name of the set and its corresponding database |
toDispatch | vector of pdb::Object's to dispatch |
- Returns
- true on success
Definition at line 214 of file DispatcherServer.cc.
void pdb::DispatcherServer::initialize |
( |
| ) |
|
void pdb::DispatcherServer::registerHandlers |
( |
PDBServer & |
forMe | ) |
|
|
overridevirtual |
void pdb::DispatcherServer::registerSet |
( |
std::pair< std::string, std::string > |
setAndDatabase, |
|
|
PartitionPolicyPtr |
partitionPolicy |
|
) |
| |
Register a new set for the dispatcher to handle.
- Parameters
-
setAndDatabase | name of the set and its corresponding database |
partitionPolicy | policy by which to partition data for this set |
Definition at line 199 of file DispatcherServer.cc.
Updates PartitionPolicy with a collection of all the available storage nodes in the cluster
- Parameters
-
storageNodes | a vector of the live storage nodes |
Definition at line 185 of file DispatcherServer.cc.
bool pdb::DispatcherServer::sendBytes |
( |
std::pair< std::string, std::string > |
setAndDatabase, |
|
|
std::string |
type, |
|
|
Handle< NodeDispatcherData > |
destination, |
|
|
char * |
bytes, |
|
|
size_t |
numBytes |
|
) |
| |
|
private |
bool pdb::DispatcherServer::validateTypes |
( |
const std::string & |
databaseName, |
|
|
const std::string & |
setName, |
|
|
const std::string & |
typeName, |
|
|
std::string & |
errMsg |
|
) |
| |
|
private |
Validates with the catalog that a request to store data is correct
- Returns
- true if the type matches the known set
Definition at line 263 of file DispatcherServer.cc.
void pdb::DispatcherServer::waitAllRequestsProcessed |
( |
| ) |
|
|
inline |
pthread_mutex_t pdb::DispatcherServer::mutex |
|
private |
int pdb::DispatcherServer::numRequestsInProcessing = 0 |
|
private |
std::map<std::pair<std::string, std::string>, PartitionPolicyPtr> pdb::DispatcherServer::partitionPolicies |
|
private |
std::shared_ptr<StatisticsDB> pdb::DispatcherServer::statisticsDB |
|
private |
The documentation for this class was generated from the following files: