summaryrefslogtreecommitdiff
path: root/src/mongo/db/clientcursor.h
diff options
context:
space:
mode:
authorJason Rassi <rassi@10gen.com>2014-12-23 12:06:46 -0500
committerJason Rassi <rassi@10gen.com>2014-12-23 22:55:51 -0500
commit7494d33c77932db60fb8cdcc1abb178e67d8c60a (patch)
treee0f2a6bd2ca23f41a0044663c48a00ba07554cb4 /src/mongo/db/clientcursor.h
parent6105f06402fe1e7578d41f3e4e583a1476ef2455 (diff)
downloadmongo-7494d33c77932db60fb8cdcc1abb178e67d8c60a.tar.gz
SERVER-16520 ClientCursor keeps ptr to owning CollectionCursorCache
Changes ClientCursor::_collection to ClientCursor::_cursorCache, and updates ClientCursor/ClientCursorPin interfaces accordingly.
Diffstat (limited to 'src/mongo/db/clientcursor.h')
-rw-r--r--src/mongo/db/clientcursor.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mongo/db/clientcursor.h b/src/mongo/db/clientcursor.h
index 1c8e694e063..356c33f2bc0 100644
--- a/src/mongo/db/clientcursor.h
+++ b/src/mongo/db/clientcursor.h
@@ -43,6 +43,7 @@ namespace mongo {
typedef boost::recursive_mutex::scoped_lock recursive_scoped_lock;
class ClientCursor;
class Collection;
+ class CollectionCursorCache;
class CurOp;
class Database;
class NamespaceDetails;
@@ -61,7 +62,7 @@ namespace mongo {
/**
* This ClientCursor constructor creates a cursorid that can be getMore'd
*/
- ClientCursor(const Collection* collection,
+ ClientCursor(CollectionCursorCache* cursorCache,
PlanExecutor* exec,
int qopts = 0,
const BSONObj query = BSONObj(),
@@ -70,7 +71,7 @@ namespace mongo {
/**
* This ClientCursor is used to track sharding state.
*/
- ClientCursor(const Collection* collection);
+ ClientCursor(CollectionCursorCache* cursorCache);
//
// Basic accessors
@@ -78,7 +79,7 @@ namespace mongo {
CursorId cursorid() const { return _cursorid; }
std::string ns() const { return _ns; }
- const Collection* collection() const { return _collection; }
+ CollectionCursorCache* cursorCache() const { return _cursorCache; }
bool isAggCursor() const { return _isAggCursor; }
//
@@ -220,7 +221,7 @@ namespace mongo {
// The namespace we're operating on.
std::string _ns;
- const Collection* _collection;
+ CollectionCursorCache* _cursorCache;
// if we've added it to the total open counter yet
bool _countedYet;
@@ -288,7 +289,7 @@ namespace mongo {
*/
class ClientCursorPin : boost::noncopyable {
public:
- ClientCursorPin( const Collection* collection, long long cursorid );
+ ClientCursorPin( CollectionCursorCache* cursorCache, long long cursorid );
~ClientCursorPin();
// This just releases the pin, does not delete the underlying
// unless ownership has passed to us after kill