summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorGeir Storli <geirst@oath.com>2017-09-11 13:01:28 +0000
committerGeir Storli <geirst@oath.com>2017-09-11 13:01:28 +0000
commit7b0399c3c2bf8a68a10ed95b7610284abc3c3a98 (patch)
treeca9788de7e829fd6eb7f786fc1eb34357c631395 /searchcore
parent8d428444659e1ad3b83b2dedcfd5e0bdd20bce89 (diff)
Move read access part of IDocumentMetaStoreContext to searchlib.
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h27
2 files changed, 5 insertions, 26 deletions
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
index 45bda8c69cc..211adce5f48 100644
--- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp
@@ -95,7 +95,7 @@ struct ViewSet
DocIdLimit _docIdLimit;
search::transactionlog::NoSyncProxy _noTlSyncer;
ISummaryManager::SP _summaryMgr;
- IDocumentMetaStoreContext::SP _dmsc;
+ proton::IDocumentMetaStoreContext::SP _dmsc;
std::shared_ptr<IGidToLidChangeHandler> _gidToLidChangeHandler;
std::unique_ptr<documentmetastore::ILidReuseDelayer> _lidReuseDelayer;
CommitTimeTracker _commitTimeTracker;
@@ -268,7 +268,7 @@ struct MyFastAccessFeedView
IThreadingService &_writeService;
HwInfo _hwInfo;
- IDocumentMetaStoreContext::SP _dmsc;
+ proton::IDocumentMetaStoreContext::SP _dmsc;
std::shared_ptr<IGidToLidChangeHandler> _gidToLidChangeHandler;
std::unique_ptr<documentmetastore::ILidReuseDelayer> _lidReuseDelayer;
CommitTimeTracker _commitTimeTracker;
diff --git a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h
index 2d2b734ca40..df03212683b 100644
--- a/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h
+++ b/searchcore/src/vespa/searchcore/proton/documentmetastore/i_document_meta_store_context.h
@@ -3,29 +3,14 @@
#pragma once
#include "i_document_meta_store.h"
+#include <vespa/searchlib/common/i_document_meta_store_context.h>
namespace proton {
/**
* API for providing write and read interface to the document meta store.
*/
-struct IDocumentMetaStoreContext {
-
- /**
- * Guard for access to the read interface.
- * This guard should be alive as long as read interface is used.
- */
- struct IReadGuard {
-
- typedef std::unique_ptr<IReadGuard> UP;
-
- virtual ~IReadGuard() {}
-
- /**
- * Access to read interface.
- */
- virtual const search::IDocumentMetaStore &get() const = 0;
- };
+struct IDocumentMetaStoreContext : public search::IDocumentMetaStoreContext {
typedef std::shared_ptr<IDocumentMetaStoreContext> SP;
@@ -35,16 +20,10 @@ struct IDocumentMetaStoreContext {
* Access to write interface.
* Should only be used by the writer thread.
*/
- virtual proton::IDocumentMetaStore & get() = 0;
+ virtual proton::IDocumentMetaStore &get() = 0;
virtual proton::IDocumentMetaStore::SP getSP() const = 0;
/**
- * Access to read interface.
- * Should be used by all reader threads.
- */
- virtual IReadGuard::UP getReadGuard() const = 0;
-
- /**
* Construct free lists of underlying meta store.
*/
virtual void constructFreeList() = 0;