summaryrefslogtreecommitdiff
path: root/src/mongo/s/query/cluster_client_cursor.h
diff options
context:
space:
mode:
authorTed Tuckman <ted.tuckman@mongodb.com>2018-09-24 16:27:58 -0400
committerTed Tuckman <ted.tuckman@mongodb.com>2018-10-04 11:22:05 -0400
commitc589abf31b748d0f13e710d8d59394b65ab6891d (patch)
tree637288a6b560f8906bc0dd6ff3bf1b55eb709b79 /src/mongo/s/query/cluster_client_cursor.h
parentf9436146f64ad7caa2ce525c1d75a85f918d68c0 (diff)
downloadmongo-c589abf31b748d0f13e710d8d59394b65ab6891d.tar.gz
SERVER-37005 Add fields to GenericCursor
Diffstat (limited to 'src/mongo/s/query/cluster_client_cursor.h')
-rw-r--r--src/mongo/s/query/cluster_client_cursor.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mongo/s/query/cluster_client_cursor.h b/src/mongo/s/query/cluster_client_cursor.h
index 5ad4ec4298f..8e993d7a737 100644
--- a/src/mongo/s/query/cluster_client_cursor.h
+++ b/src/mongo/s/query/cluster_client_cursor.h
@@ -160,6 +160,31 @@ public:
*/
virtual boost::optional<ReadPreferenceSetting> getReadPreference() const = 0;
+ /**
+ * Returns the creation date of the cursor.
+ */
+ virtual Date_t getCreatedDate() const = 0;
+
+ /**
+ * Returns the date the cursor was last used.
+ */
+ virtual Date_t getLastUseDate() const = 0;
+
+ /**
+ * Set the last use date to the provided time.
+ */
+ virtual void setLastUseDate(Date_t now) = 0;
+
+ /**
+ * Returns the number of batches returned by this cursor.
+ */
+ virtual std::uint64_t getNBatches() const = 0;
+
+ /**
+ * Increment the number of batches returned so far by one.
+ */
+ virtual void incNBatches() = 0;
+
//
// maxTimeMS support.
//