#include <client.h>
Classes | |
struct | WBInfo |
Public Member Functions | |
void | addShard (const string &shard) |
bool | autoSplitOk () const |
void | clearCurrentShards () |
void | clearSinceLastGetError () |
ClientInfo () | |
void | disconnect () |
bool | getLastError (const BSONObj &options, BSONObjBuilder &result, bool fromWriteBackListener=false) |
set< string > * | getPrev () const |
HostAndPort | getRemote () const |
void | newRequest (AbstractMessagingPort *p=0) |
void | noAutoSplit () |
const set< string > & | sinceLastGetError () const |
~ClientInfo () | |
Static Public Member Functions | |
static ClientInfo * | get () |
Private Member Functions | |
void | _addWriteBack (vector< WBInfo > &all, const BSONObj &o) |
vector< BSONObj > | _handleWriteBacks (vector< WBInfo > &all, bool fromWriteBackListener) |
Private Attributes | |
set< string > | _a |
bool | _autoSplitOk |
set< string > | _b |
set< string > * | _cur |
int | _id |
int | _lastAccess |
set< string > * | _prev |
HostAndPort | _remote |
set< string > | _sinceLastGetError |
Static Private Attributes | |
static boost::thread_specific_ptr < ClientInfo > | _tlInfo |
holds information about a client connected to a mongos 1 per client socket currently implemented with a thread local
Definition at line 28 of file s/client.h.
mongo::ClientInfo::ClientInfo | ( | ) |
mongo::ClientInfo::~ClientInfo | ( | ) |
vector<BSONObj> mongo::ClientInfo::_handleWriteBacks | ( | vector< WBInfo > & | all, | |
bool | fromWriteBackListener | |||
) | [private] |
void mongo::ClientInfo::addShard | ( | const string & | shard | ) |
notes that this client use this shard keeps track of all shards accessed this request
bool mongo::ClientInfo::autoSplitOk | ( | ) | const [inline] |
Definition at line 79 of file s/client.h.
void mongo::ClientInfo::clearCurrentShards | ( | ) | [inline] |
resets the list of shards using to process the current request
Definition at line 69 of file s/client.h.
void mongo::ClientInfo::clearSinceLastGetError | ( | ) | [inline] |
clears list of shards we've talked to
Definition at line 63 of file s/client.h.
void mongo::ClientInfo::disconnect | ( | ) |
client disconnected
static ClientInfo* mongo::ClientInfo::get | ( | ) | [static] |
bool mongo::ClientInfo::getLastError | ( | const BSONObj & | options, | |
BSONObjBuilder & | result, | |||
bool | fromWriteBackListener = false | |||
) |
calls getLastError resets shards since get last error
set<string>* mongo::ClientInfo::getPrev | ( | ) | const [inline] |
gets shards used on the previous request
Definition at line 53 of file s/client.h.
HostAndPort mongo::ClientInfo::getRemote | ( | ) | const [inline] |
Definition at line 42 of file s/client.h.
void mongo::ClientInfo::newRequest | ( | AbstractMessagingPort * | p = 0 |
) |
new request from client, adjusts internal state
void mongo::ClientInfo::noAutoSplit | ( | ) | [inline] |
Definition at line 81 of file s/client.h.
const set<string>& mongo::ClientInfo::sinceLastGetError | ( | ) | const [inline] |
gets all shards we've accessed since the last time we called clearSinceLastGetError
Definition at line 58 of file s/client.h.
set<string> mongo::ClientInfo::_a [private] |
Definition at line 104 of file s/client.h.
bool mongo::ClientInfo::_autoSplitOk [private] |
Definition at line 114 of file s/client.h.
set<string> mongo::ClientInfo::_b [private] |
Definition at line 105 of file s/client.h.
set<string>* mongo::ClientInfo::_cur [private] |
Definition at line 107 of file s/client.h.
int mongo::ClientInfo::_id [private] |
Definition at line 98 of file s/client.h.
int mongo::ClientInfo::_lastAccess [private] |
Definition at line 113 of file s/client.h.
set<string>* mongo::ClientInfo::_prev [private] |
Definition at line 108 of file s/client.h.
HostAndPort mongo::ClientInfo::_remote [private] |
Definition at line 99 of file s/client.h.
set<string> mongo::ClientInfo::_sinceLastGetError [private] |
Definition at line 111 of file s/client.h.
boost::thread_specific_ptr<ClientInfo> mongo::ClientInfo::_tlInfo [static, private] |
Definition at line 116 of file s/client.h.