summaryrefslogtreecommitdiff
path: root/src/mongo/db/logical_session_cache.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2019-05-16 17:42:25 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2019-05-21 17:42:12 -0400
commit65656c4bc9390c52205b73451abff0b7b6b74396 (patch)
tree6892a9719c44c38af42a6ecabc0984a78fe753cb /src/mongo/db/logical_session_cache.h
parent107dd43e99f191c541c0c0faab40ff0d9bc47550 (diff)
downloadmongo-65656c4bc9390c52205b73451abff0b7b6b74396.tar.gz
SERVER-41193 Get rid of the `refreshSessionsInternal` command
Diffstat (limited to 'src/mongo/db/logical_session_cache.h')
-rw-r--r--src/mongo/db/logical_session_cache.h30
1 files changed, 11 insertions, 19 deletions
diff --git a/src/mongo/db/logical_session_cache.h b/src/mongo/db/logical_session_cache.h
index e035ee13d7f..38f323eeda5 100644
--- a/src/mongo/db/logical_session_cache.h
+++ b/src/mongo/db/logical_session_cache.h
@@ -35,7 +35,6 @@
#include "mongo/db/logical_session_cache_gen.h"
#include "mongo/db/logical_session_cache_stats_gen.h"
#include "mongo/db/logical_session_id.h"
-#include "mongo/db/refresh_sessions_gen.h"
namespace mongo {
@@ -67,24 +66,22 @@ public:
* to be the most recently used and updates its lastUse date to be the current
* time. Returns an error if the session was not found.
*/
- virtual Status promote(LogicalSessionId lsid) = 0;
+ virtual Status promote(const LogicalSessionId& lsid) = 0;
/**
- * Inserts a new authoritative session record into the cache. This method will
- * insert the authoritative record into the sessions collection. This method
- * should only be used when starting new sessions and should not be used to
- * insert records for existing sessions.
+ * Inserts a new authoritative session record into the cache.
+ *
+ * This method will insert the authoritative record into the sessions collection and should only
+ * be used when starting new sessions. It should not be used to insert records for existing
+ * sessions.
*/
- virtual Status startSession(OperationContext* opCtx, LogicalSessionRecord record) = 0;
+ virtual Status startSession(OperationContext* opCtx, const LogicalSessionRecord& record) = 0;
/**
- * Refresh the given sessions. Updates the timestamps of these records in
- * the local cache.
+ * Refresh the given sessions. Updates the timestamps of these records in the local cache.
*/
virtual Status refreshSessions(OperationContext* opCtx,
- const RefreshSessionsCmdFromClient& cmd) = 0;
- virtual Status refreshSessions(OperationContext* opCtx,
- const RefreshSessionsCmdFromClusterMember& cmd) = 0;
+ const std::vector<LogicalSessionFromClient>& sessions) = 0;
/**
* Vivifies the session in the cache. I.e. creates it if it isn't there, updates last use if it
@@ -98,8 +95,8 @@ public:
virtual void endSessions(const LogicalSessionIdSet& lsids) = 0;
/**
- * Refreshes the cache synchronously. This flushes all pending refreshes and
- * inserts to the sessions collection.
+ * Refreshes the cache synchronously. This flushes all pending refreshes and inserts to the
+ * sessions collection.
*/
virtual Status refreshNow(Client* client) = 0;
@@ -109,11 +106,6 @@ public:
virtual Status reapNow(Client* client) = 0;
/**
- * Returns the current time.
- */
- virtual Date_t now() = 0;
-
- /**
* Returns the number of session records currently in the cache.
*/
virtual size_t size() = 0;