The client used to access the Distributed Map. More...
#include <DM_Client.h>
Public Member Functions | |
DM_Client (int num_entities, const string &servers, Synchronizer_Helper &sync_helper) | |
virtual | ~DM_Client () |
void | put (const string &entity, const string &delta) |
The usual map operations. | |
void | set (const string &entity, const string &counts) |
bool | get (const string &entity, string &counts) |
bool | remove (const string &entity, string &counts) |
void | begin_putNget (const string &entity, const string &delta) |
Start the asynchronous putNget operation. | |
void | wait_for_all () |
Execute a barrier. | |
void | wait_till_done () |
int | get_num_servers () |
The client used to access the Distributed Map.
Wrapper class to delegate the Distributed Map operations to the appropriate Server
DM_Client::DM_Client | ( | int | num_entities, | |
const string & | servers, | |||
Synchronizer_Helper & | sync_helper | |||
) |
The servers in the Distributed Map setup The max number of entities that you are going to store in the map. This is just to make sure that things dont break when you are processing a very small number of entities particularly smaller than MAX_MSGS The helper class that provides the actual call back functionality
DM_Client::~DM_Client | ( | ) | [virtual] |
void DM_Client::begin_putNget | ( | const string & | entity, | |
const string & | delta | |||
) | [virtual] |
Start the asynchronous putNget operation.
Implements Client.
bool DM_Client::get | ( | const string & | key, | |
string & | val | |||
) | [virtual] |
Gets the serialized val stored for the key in the Distributed Map. Returns true if key exists and false otherwise
Implements Client.
int DM_Client::get_num_servers | ( | ) |
void DM_Client::put | ( | const string & | entity, | |
const string & | delta | |||
) | [virtual] |
The usual map operations.
Implements Client.
bool DM_Client::remove | ( | const string & | key, | |
string & | val | |||
) | [virtual] |
Remove the key from the Distributed Map returning the serialized value stored as val. Returns true if key exists and false otherwise
Implements Client.
void DM_Client::set | ( | const string & | key, | |
const string & | val | |||
) | [virtual] |
Sets val as the serialized value for the key in the Distributed Map. This has replace semantics
Implements Client.
void DM_Client::wait_for_all | ( | ) | [virtual] |
Execute a barrier.
Implements Client.
void DM_Client::wait_till_done | ( | ) | [virtual] |
Provides functionality to wait for any asynchronous communication to end
Implements Client.