summaryrefslogtreecommitdiff
path: root/src/mongo/db/sessions_collection_mock.h
diff options
context:
space:
mode:
authorsamantharitter <samantha.ritter@10gen.com>2017-08-15 18:03:59 -0400
committersamantharitter <samantha.ritter@10gen.com>2017-08-18 08:49:39 -0400
commitcacf36cb6647c9f3f6e895c7face718a54725567 (patch)
tree8c177186fadf8b109e5edac6e8b9f501fbad4966 /src/mongo/db/sessions_collection_mock.h
parent854cc3ca62115c0296e27c75ff017a11614254c6 (diff)
downloadmongo-cacf36cb6647c9f3f6e895c7face718a54725567.tar.gz
SERVER-29202 Remove unused fetch methods from logical session cache
Diffstat (limited to 'src/mongo/db/sessions_collection_mock.h')
-rw-r--r--src/mongo/db/sessions_collection_mock.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/mongo/db/sessions_collection_mock.h b/src/mongo/db/sessions_collection_mock.h
index 5456e0731a2..cf0a88c324c 100644
--- a/src/mongo/db/sessions_collection_mock.h
+++ b/src/mongo/db/sessions_collection_mock.h
@@ -58,12 +58,10 @@ public:
MockSessionsCollectionImpl();
- using FetchHook = stdx::function<StatusWith<LogicalSessionRecord>(const LogicalSessionId&)>;
using RefreshHook = stdx::function<Status(const LogicalSessionRecordSet&)>;
using RemoveHook = stdx::function<Status(const LogicalSessionIdSet&)>;
// Set custom hooks to override default behavior
- void setFetchHook(FetchHook hook);
void setRefreshHook(RefreshHook hook);
void setRemoveHook(RemoveHook hook);
@@ -71,7 +69,6 @@ public:
void clearHooks();
// Forwarding methods from the MockSessionsCollection
- StatusWith<LogicalSessionRecord> fetchRecord(const LogicalSessionId& id);
Status refreshSessions(const LogicalSessionRecordSet& sessions);
Status removeRecords(const LogicalSessionIdSet& sessions);
@@ -84,14 +81,12 @@ public:
private:
// Default implementations, may be overridden with custom hooks.
- StatusWith<LogicalSessionRecord> _fetchRecord(const LogicalSessionId& id);
Status _refreshSessions(const LogicalSessionRecordSet& sessions);
Status _removeRecords(const LogicalSessionIdSet& sessions);
stdx::mutex _mutex;
SessionMap _sessions;
- FetchHook _fetch;
RefreshHook _refresh;
RemoveHook _remove;
};
@@ -106,11 +101,6 @@ public:
explicit MockSessionsCollection(std::shared_ptr<MockSessionsCollectionImpl> impl)
: _impl(std::move(impl)) {}
- StatusWith<LogicalSessionRecord> fetchRecord(OperationContext* opCtx,
- const LogicalSessionId& id) override {
- return _impl->fetchRecord(id);
- }
-
Status refreshSessions(OperationContext* opCtx,
const LogicalSessionRecordSet& sessions,
Date_t refreshTime) override {