mongo::ClientInfo Class Reference

#include <client.h>

List of all members.

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 ClientInfoget ()

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

Detailed Description

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.


Constructor & Destructor Documentation

mongo::ClientInfo::ClientInfo (  ) 
mongo::ClientInfo::~ClientInfo (  ) 

Member Function Documentation

void mongo::ClientInfo::_addWriteBack ( vector< WBInfo > &  all,
const BSONObj o 
) [private]
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]
Returns:
if its ok to auto split from this client

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

Returns:
if the command was ok or if there was an 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]
Returns:
remote socket address of the client

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.


Member Data Documentation

set<string> mongo::ClientInfo::_a [private]

Definition at line 104 of file s/client.h.

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.

Definition at line 113 of file s/client.h.

set<string>* mongo::ClientInfo::_prev [private]

Definition at line 108 of file s/client.h.

Definition at line 99 of file s/client.h.

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.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


mongodb
Author(s): Nate Koenig
autogenerated on Fri Jan 11 12:15:54 2013