mongo::ClientCursor Class Reference
#include <clientcursor.h>
List of all members.
Classes |
class | CleanupPointer |
class | Pointer |
struct | YieldData |
struct | YieldLock |
Public Member Functions |
bool | advance () |
Cursor * | c () const |
| ClientCursor (int queryOptions, const shared_ptr< Cursor > &c, const string &ns, BSONObj query=BSONObj()) |
BSONObj | current () |
bool | currentIsDup () |
bool | currentMatches () |
BSONObj | currKey () const |
DiskLoc | currLoc () |
CursorId | cursorid () const |
Database * | db () const |
BSONElement | getFieldDotted (const string &name, bool *fromKey=0) |
bool | getFieldsDotted (const string &name, BSONElementSet &ret) |
unsigned | idleTime () const |
void | incPos (int n) |
BSONObj | indexKeyPattern () |
bool | isMultiKey () const |
DiskLoc | lastLoc () const |
void | mayUpgradeStorage () |
bool | modifiedKeys () const |
string | ns () const |
bool | ok () |
int | pos () const |
bool | prepareToYield (YieldData &data) |
const BSONObj & | query () const |
int | queryOptions () const |
void | setDoingDeletes (bool doingDeletes) |
void | setPos (int n) |
bool | shouldTimeout (unsigned millis) |
void | slaveReadTill (const OpTime &t) |
void | storeOpForSlave (DiskLoc last) |
void | updateLocation () |
void | updateSlaveLocation (CurOp &curop) |
bool | yield (int microsToSleep=-1) |
bool | yieldSometimes () |
| ~ClientCursor () |
Static Public Member Functions |
static void | aboutToDelete (const DiskLoc &dl) |
static void | appendStats (BSONObjBuilder &result) |
static void | assertNoCursors () |
static int | erase (int n, long long *ids) |
static bool | erase (CursorId id) |
static void | find (const string &ns, set< CursorId > &all) |
static ClientCursor * | find (CursorId id, bool warn=true) |
static void | idleTimeReport (unsigned millis) |
static void | informAboutToDeleteBucket (const DiskLoc &b) |
static void | invalidate (const char *nsPrefix) |
static unsigned | numCursors () |
static bool | recoverFromYield (const YieldData &data) |
static void | staticYield (int micros, const StringData &ns) |
static int | yieldSuggest () |
Public Attributes |
shared_ptr< Projection > | fields |
Message | originalMessage |
shared_ptr< ParsedQuery > | pq |
Private Member Functions |
CCByLoc & | byLoc () |
void | noTimeout () |
void | setLastLoc_inlock (DiskLoc) |
Static Private Member Functions |
static CursorId | allocCursorId_inlock () |
static ClientCursor * | find_inlock (CursorId id, bool warn=true) |
Private Attributes |
const shared_ptr< Cursor > | _c |
CursorId | _cursorid |
Database * | _db |
bool | _doingDeletes |
unsigned | _idleAgeMillis |
map< string, int > | _indexedFields |
DiskLoc | _lastLoc |
const string | _ns |
unsigned | _pinValue |
int | _pos |
const BSONObj | _query |
int | _queryOptions |
OpTime | _slaveReadTill |
ElapsedTracker | _yieldSometimesTracker |
Static Private Attributes |
static boost::recursive_mutex | ccmutex |
static CCById | clientCursorsById |
static long long | numberTimedOut |
Friends |
class | CmdCursorInfo |
Detailed Description
Definition at line 71 of file clientcursor.h.
Constructor & Destructor Documentation
mongo::ClientCursor::ClientCursor |
( |
int |
queryOptions, |
|
|
const shared_ptr< Cursor > & |
c, |
|
|
const string & |
ns, |
|
|
BSONObj |
query = BSONObj() | |
|
) |
| | |
mongo::ClientCursor::~ClientCursor |
( |
|
) |
|
Member Function Documentation
static void mongo::ClientCursor::aboutToDelete |
( |
const DiskLoc & |
dl |
) |
[static] |
bool mongo::ClientCursor::advance |
( |
|
) |
[inline] |
static CursorId mongo::ClientCursor::allocCursorId_inlock |
( |
|
) |
[static, private] |
static void mongo::ClientCursor::appendStats |
( |
BSONObjBuilder & |
result |
) |
[static] |
static void mongo::ClientCursor::assertNoCursors |
( |
|
) |
[static] |
CCByLoc& mongo::ClientCursor::byLoc |
( |
|
) |
[inline, private] |
Cursor* mongo::ClientCursor::c |
( |
|
) |
const [inline] |
BSONObj mongo::ClientCursor::current |
( |
|
) |
[inline] |
bool mongo::ClientCursor::currentIsDup |
( |
|
) |
[inline] |
bool mongo::ClientCursor::currentMatches |
( |
|
) |
[inline] |
BSONObj mongo::ClientCursor::currKey |
( |
|
) |
const [inline] |
DiskLoc mongo::ClientCursor::currLoc |
( |
|
) |
[inline] |
CursorId mongo::ClientCursor::cursorid |
( |
|
) |
const [inline] |
Database* mongo::ClientCursor::db |
( |
|
) |
const [inline] |
static int mongo::ClientCursor::erase |
( |
int |
n, |
|
|
long long * |
ids | |
|
) |
| | [static] |
- Returns:
- number of cursors found
static bool mongo::ClientCursor::erase |
( |
CursorId |
id |
) |
[inline, static] |
static void mongo::ClientCursor::find |
( |
const string & |
ns, |
|
|
set< CursorId > & |
all | |
|
) |
| | [static] |
static ClientCursor* mongo::ClientCursor::find_inlock |
( |
CursorId |
id, |
|
|
bool |
warn = true | |
|
) |
| | [inline, static, private] |
BSONElement mongo::ClientCursor::getFieldDotted |
( |
const string & |
name, |
|
|
bool * |
fromKey = 0 | |
|
) |
| | |
bool mongo::ClientCursor::getFieldsDotted |
( |
const string & |
name, |
|
|
BSONElementSet & |
ret | |
|
) |
| | |
unsigned mongo::ClientCursor::idleTime |
( |
|
) |
const [inline] |
static void mongo::ClientCursor::idleTimeReport |
( |
unsigned |
millis |
) |
[static] |
void mongo::ClientCursor::incPos |
( |
int |
n |
) |
[inline] |
BSONObj mongo::ClientCursor::indexKeyPattern |
( |
|
) |
[inline] |
static void mongo::ClientCursor::informAboutToDeleteBucket |
( |
const DiskLoc & |
b |
) |
[static] |
static void mongo::ClientCursor::invalidate |
( |
const char * |
nsPrefix |
) |
[static] |
bool mongo::ClientCursor::isMultiKey |
( |
|
) |
const [inline] |
DiskLoc mongo::ClientCursor::lastLoc |
( |
|
) |
const [inline] |
void mongo::ClientCursor::mayUpgradeStorage |
( |
|
) |
[inline] |
bool mongo::ClientCursor::modifiedKeys |
( |
|
) |
const [inline] |
void mongo::ClientCursor::noTimeout |
( |
|
) |
[inline, private] |
string mongo::ClientCursor::ns |
( |
|
) |
const [inline] |
static unsigned mongo::ClientCursor::numCursors |
( |
|
) |
[inline, static] |
bool mongo::ClientCursor::ok |
( |
|
) |
[inline] |
int mongo::ClientCursor::pos |
( |
|
) |
const [inline] |
bool mongo::ClientCursor::prepareToYield |
( |
YieldData & |
data |
) |
|
const BSONObj& mongo::ClientCursor::query |
( |
|
) |
const [inline] |
int mongo::ClientCursor::queryOptions |
( |
|
) |
const [inline] |
static bool mongo::ClientCursor::recoverFromYield |
( |
const YieldData & |
data |
) |
[static] |
void mongo::ClientCursor::setDoingDeletes |
( |
bool |
doingDeletes |
) |
[inline] |
void mongo::ClientCursor::setLastLoc_inlock |
( |
DiskLoc |
|
) |
[private] |
void mongo::ClientCursor::setPos |
( |
int |
n |
) |
[inline] |
bool mongo::ClientCursor::shouldTimeout |
( |
unsigned |
millis |
) |
|
- Parameters:
-
| millis | amount of idle passed time since last call |
void mongo::ClientCursor::slaveReadTill |
( |
const OpTime & |
t |
) |
[inline] |
static void mongo::ClientCursor::staticYield |
( |
int |
micros, |
|
|
const StringData & |
ns | |
|
) |
| | [static] |
void mongo::ClientCursor::storeOpForSlave |
( |
DiskLoc |
last |
) |
|
void mongo::ClientCursor::updateLocation |
( |
|
) |
|
void mongo::ClientCursor::updateSlaveLocation |
( |
CurOp & |
curop |
) |
|
bool mongo::ClientCursor::yield |
( |
int |
microsToSleep = -1 |
) |
|
- Parameters:
-
| microsToSleep | -1 : ask client >=0 : sleep for that amount do a dbtemprelease note: caller should check matcher.docMatcher().atomic() first and not yield if atomic - we don't do herein as this->matcher (above) is only initialized for true queries/getmore. (ie not set for remote/update) |
- Returns:
- if the cursor is still valid. if false is returned, then this ClientCursor should be considered deleted - in fact, the whole database could be gone.
bool mongo::ClientCursor::yieldSometimes |
( |
|
) |
|
static int mongo::ClientCursor::yieldSuggest |
( |
|
) |
[static] |
Friends And Related Function Documentation
friend class CmdCursorInfo [friend] |
Member Data Documentation
The documentation for this class was generated from the following file: