summaryrefslogtreecommitdiff
path: root/src/mongo/db/logical_session_cache.h
diff options
context:
space:
mode:
authorSara Golemon <sara.golemon@mongodb.com>2017-08-08 13:34:39 -0400
committerSara Golemon <sara.golemon@mongodb.com>2017-08-23 09:18:17 -0400
commita09f19822fb2a1e5b662bd8d542dd8e2f2607fc6 (patch)
tree4d396a07bdf8db1752aa4952211f4b46490459b7 /src/mongo/db/logical_session_cache.h
parent3b8719aecf7541ee83738d9241bfcbc1281b6ed2 (diff)
downloadmongo-a09f19822fb2a1e5b662bd8d542dd8e2f2607fc6.tar.gz
SERVER-29628 $listLocalSessions aggregation stage
Diffstat (limited to 'src/mongo/db/logical_session_cache.h')
-rw-r--r--src/mongo/db/logical_session_cache.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mongo/db/logical_session_cache.h b/src/mongo/db/logical_session_cache.h
index dfc1772013a..8e7ba166874 100644
--- a/src/mongo/db/logical_session_cache.h
+++ b/src/mongo/db/logical_session_cache.h
@@ -28,6 +28,8 @@
#pragma once
+#include <boost/optional.hpp>
+
#include "mongo/base/status.h"
#include "mongo/db/logical_session_id.h"
#include "mongo/db/refresh_sessions_gen.h"
@@ -103,6 +105,22 @@ public:
* Returns the number of session records currently in the cache.
*/
virtual size_t size() = 0;
+
+ /**
+ * Ennumerate all LogicalSessionId keys currently in the cache.
+ */
+ virtual std::vector<LogicalSessionId> listIds() const = 0;
+
+ /**
+ * Ennumerate all LogicalSessionId keys in the cache for the given UserDigests.
+ */
+ virtual std::vector<LogicalSessionId> listIds(
+ const std::vector<SHA256Block>& userDigest) const = 0;
+
+ /**
+ * Retrieve a LogicalSessionRecord by LogicalSessionId, if it exists in the cache.
+ */
+ virtual boost::optional<LogicalSessionRecord> peekCached(const LogicalSessionId& id) const = 0;
};
} // namespace mongo