aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-07-08 09:04:48 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-07-08 09:04:48 +0000
commit2718eae165313d48e3a65c2227e14a3e68d35943 (patch)
tree10440fb0479851b9e2ab4796229975738b4ffb09 /searchcore/src
parent8a419bfbb5894216ab52cec0b12805daedab5faa (diff)
Rename context to IDestructorCallbackSP
Diffstat (limited to 'searchcore/src')
-rw-r--r--searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp4
-rw-r--r--searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp4
-rw-r--r--searchcore/src/tests/proton/reference/gid_to_lid_change_registrator/gid_to_lid_change_registrator_test.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_handler.cpp8
-rw-r--r--searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_handler.h8
-rw-r--r--searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.cpp4
-rw-r--r--searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_handler.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_listener.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/test/mock_gid_to_lid_change_handler.h4
13 files changed, 31 insertions, 31 deletions
diff --git a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
index 38d5b0d35b1..a538d36ddf5 100644
--- a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
+++ b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp
@@ -185,14 +185,14 @@ public:
{
}
- void notifyPutDone(Context, document::GlobalId gid, uint32_t lid, SerialNum) override {
+ void notifyPutDone(IDestructorCallbackSP, document::GlobalId gid, uint32_t lid, SerialNum) override {
_changeGid = gid;
_changeLid = lid;
_gidToLid[gid] = lid;
++_changes;
}
- void notifyRemove(Context, document::GlobalId gid, SerialNum) override {
+ void notifyRemove(IDestructorCallbackSP, document::GlobalId gid, SerialNum) override {
_changeGid = gid;
_changeLid = 0;
_gidToLid[gid] = 0;
diff --git a/searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp b/searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp
index 0c69fbaed55..920472c6a01 100644
--- a/searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp
+++ b/searchcore/src/tests/proton/reference/gid_to_lid_change_handler/gid_to_lid_change_handler_test.cpp
@@ -102,8 +102,8 @@ public:
_stats.markCreatedListener();
}
~MyListener() override { _stats.markDestroyedListener(); }
- void notifyPutDone(Context, GlobalId, uint32_t) override { _stats.notifyPutDone(); }
- void notifyRemove(Context, GlobalId) override { _stats.notifyRemove(); }
+ void notifyPutDone(IDestructorCallbackSP, GlobalId, uint32_t) override { _stats.notifyPutDone(); }
+ void notifyRemove(IDestructorCallbackSP, GlobalId) override { _stats.notifyRemove(); }
void notifyRegistered() override { _stats.markRegisteredListener(); }
const vespalib::string &getName() const override { return _name; }
const vespalib::string &getDocTypeName() const override { return _docTypeName; }
diff --git a/searchcore/src/tests/proton/reference/gid_to_lid_change_registrator/gid_to_lid_change_registrator_test.cpp b/searchcore/src/tests/proton/reference/gid_to_lid_change_registrator/gid_to_lid_change_registrator_test.cpp
index 6fcc57ce398..ebbd04a4738 100644
--- a/searchcore/src/tests/proton/reference/gid_to_lid_change_registrator/gid_to_lid_change_registrator_test.cpp
+++ b/searchcore/src/tests/proton/reference/gid_to_lid_change_registrator/gid_to_lid_change_registrator_test.cpp
@@ -24,8 +24,8 @@ public:
{
}
~MyListener() override { }
- void notifyPutDone(Context, document::GlobalId, uint32_t) override { }
- void notifyRemove(Context, document::GlobalId) override { }
+ void notifyPutDone(IDestructorCallbackSP, document::GlobalId, uint32_t) override { }
+ void notifyRemove(IDestructorCallbackSP, document::GlobalId) override { }
void notifyRegistered() override { }
const vespalib::string &getName() const override { return _name; }
const vespalib::string &getDocTypeName() const override { return _docTypeName; }
diff --git a/searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.cpp b/searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.cpp
index 42b2facc138..6c45096a53f 100644
--- a/searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.cpp
+++ b/searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.cpp
@@ -9,12 +9,12 @@ DummyGidToLidChangeHandler::DummyGidToLidChangeHandler() = default;
DummyGidToLidChangeHandler::~DummyGidToLidChangeHandler() = default;
void
-DummyGidToLidChangeHandler::notifyPutDone(Context , GlobalId, uint32_t, SerialNum)
+DummyGidToLidChangeHandler::notifyPutDone(IDestructorCallbackSP , GlobalId, uint32_t, SerialNum)
{
}
void
-DummyGidToLidChangeHandler::notifyRemove(Context , GlobalId, SerialNum)
+DummyGidToLidChangeHandler::notifyRemove(IDestructorCallbackSP , GlobalId, SerialNum)
{
}
diff --git a/searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.h b/searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.h
index 3527980cc7f..d5f6d788885 100644
--- a/searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.h
+++ b/searchcore/src/vespa/searchcore/proton/reference/dummy_gid_to_lid_change_handler.h
@@ -22,8 +22,8 @@ public:
DummyGidToLidChangeHandler();
~DummyGidToLidChangeHandler() override;
- void notifyPutDone(Context context, GlobalId gid, uint32_t lid, SerialNum serialNum) override;
- void notifyRemove(Context context, GlobalId gid, SerialNum serialNum) override;
+ void notifyPutDone(IDestructorCallbackSP context, GlobalId gid, uint32_t lid, SerialNum serialNum) override;
+ void notifyRemove(IDestructorCallbackSP context, GlobalId gid, SerialNum serialNum) override;
void notifyRemoveDone(GlobalId gid, SerialNum serialNum) override;
void addListener(std::unique_ptr<IGidToLidChangeListener> listener) override;
void removeListeners(const vespalib::string &docTypeName, const std::set<vespalib::string> &keepNames) override;
diff --git a/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_handler.cpp b/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_handler.cpp
index 58873060c6c..0c9087405b6 100644
--- a/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_handler.cpp
+++ b/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_handler.cpp
@@ -27,7 +27,7 @@ GidToLidChangeHandler::~GidToLidChangeHandler()
}
void
-GidToLidChangeHandler::notifyPutDone(Context context, GlobalId gid, uint32_t lid)
+GidToLidChangeHandler::notifyPutDone(IDestructorCallbackSP context, GlobalId gid, uint32_t lid)
{
for (const auto &listener : _listeners) {
listener->notifyPutDone(context, gid, lid);
@@ -35,7 +35,7 @@ GidToLidChangeHandler::notifyPutDone(Context context, GlobalId gid, uint32_t lid
}
void
-GidToLidChangeHandler::notifyRemove(Context context, GlobalId gid)
+GidToLidChangeHandler::notifyRemove(IDestructorCallbackSP context, GlobalId gid)
{
for (const auto &listener : _listeners) {
listener->notifyRemove(context, gid);
@@ -43,7 +43,7 @@ GidToLidChangeHandler::notifyRemove(Context context, GlobalId gid)
}
void
-GidToLidChangeHandler::notifyPutDone(Context context, GlobalId gid, uint32_t lid, SerialNum serialNum)
+GidToLidChangeHandler::notifyPutDone(IDestructorCallbackSP context, GlobalId gid, uint32_t lid, SerialNum serialNum)
{
lock_guard guard(_lock);
auto itr = _pendingRemove.find(gid);
@@ -63,7 +63,7 @@ GidToLidChangeHandler::notifyPutDone(Context context, GlobalId gid, uint32_t lid
}
void
-GidToLidChangeHandler::notifyRemove(Context context, GlobalId gid, SerialNum serialNum)
+GidToLidChangeHandler::notifyRemove(IDestructorCallbackSP context, GlobalId gid, SerialNum serialNum)
{
lock_guard guard(_lock);
auto insRes = _pendingRemove.insert(std::make_pair(gid, PendingRemoveEntry(serialNum)));
diff --git a/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_handler.h b/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_handler.h
index 61ad2ad31ae..13a51edd0b5 100644
--- a/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_handler.h
+++ b/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_handler.h
@@ -45,14 +45,14 @@ class GidToLidChangeHandler : public std::enable_shared_from_this<GidToLidChange
bool _closed;
vespalib::hash_map<GlobalId, PendingRemoveEntry, GlobalId::hash> _pendingRemove;
- void notifyPutDone(Context context, GlobalId gid, uint32_t lid);
- void notifyRemove(Context context, GlobalId gid);
+ void notifyPutDone(IDestructorCallbackSP context, GlobalId gid, uint32_t lid);
+ void notifyRemove(IDestructorCallbackSP context, GlobalId gid);
public:
GidToLidChangeHandler();
~GidToLidChangeHandler() override;
- void notifyPutDone(Context context, GlobalId gid, uint32_t lid, SerialNum serialNum) override;
- void notifyRemove(Context context, GlobalId gid, SerialNum serialNum) override;
+ void notifyPutDone(IDestructorCallbackSP context, GlobalId gid, uint32_t lid, SerialNum serialNum) override;
+ void notifyRemove(IDestructorCallbackSP context, GlobalId gid, SerialNum serialNum) override;
void notifyRemoveDone(GlobalId gid, SerialNum serialNum) override;
/**
diff --git a/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.cpp b/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.cpp
index 4450425e12f..c54346defd5 100644
--- a/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.cpp
+++ b/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.cpp
@@ -26,7 +26,7 @@ GidToLidChangeListener::~GidToLidChangeListener()
}
void
-GidToLidChangeListener::notifyPutDone(Context context, document::GlobalId gid, uint32_t lid)
+GidToLidChangeListener::notifyPutDone(IDestructorCallbackSP context, document::GlobalId gid, uint32_t lid)
{
_attributeFieldWriter.executeLambda(_executorId,
[this, context=std::move(context), gid, lid]() {
@@ -36,7 +36,7 @@ GidToLidChangeListener::notifyPutDone(Context context, document::GlobalId gid, u
}
void
-GidToLidChangeListener::notifyRemove(Context context, document::GlobalId gid)
+GidToLidChangeListener::notifyRemove(IDestructorCallbackSP context, document::GlobalId gid)
{
_attributeFieldWriter.executeLambda(_executorId,
[this, context = std::move(context), gid]() {
diff --git a/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.h b/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.h
index 326513e6367..ae53e674c24 100644
--- a/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.h
+++ b/searchcore/src/vespa/searchcore/proton/reference/gid_to_lid_change_listener.h
@@ -29,8 +29,8 @@ public:
const vespalib::string &name,
const vespalib::string &docTypeName);
~GidToLidChangeListener() override;
- void notifyPutDone(Context context, document::GlobalId gid, uint32_t lid) override;
- void notifyRemove(Context context, document::GlobalId gid) override;
+ void notifyPutDone(IDestructorCallbackSP context, document::GlobalId gid, uint32_t lid) override;
+ void notifyRemove(IDestructorCallbackSP context, document::GlobalId gid) override;
void notifyRegistered() override;
const vespalib::string &getName() const override;
const vespalib::string &getDocTypeName() const override;
diff --git a/searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_handler.h b/searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_handler.h
index 0e64827d969..cbafef57e46 100644
--- a/searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_handler.h
+++ b/searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_handler.h
@@ -17,7 +17,7 @@ namespace proton {
class IGidToLidChangeHandler
{
public:
- using Context = IGidToLidChangeListener::Context;
+ using IDestructorCallbackSP = IGidToLidChangeListener::IDestructorCallbackSP;
using SerialNum = search::SerialNum;
using GlobalId = document::GlobalId;
@@ -38,8 +38,8 @@ public:
/**
* Notify gid to lid mapping change.
*/
- virtual void notifyPutDone(Context context, GlobalId gid, uint32_t lid, SerialNum serialNum) = 0;
- virtual void notifyRemove(Context context, GlobalId gid, SerialNum serialNum) = 0;
+ virtual void notifyPutDone(IDestructorCallbackSP context, GlobalId gid, uint32_t lid, SerialNum serialNum) = 0;
+ virtual void notifyRemove(IDestructorCallbackSP context, GlobalId gid, SerialNum serialNum) = 0;
virtual void notifyRemoveDone(GlobalId gid, SerialNum serialNum) = 0;
};
diff --git a/searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_listener.h b/searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_listener.h
index d997c87305b..5a216486d96 100644
--- a/searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_listener.h
+++ b/searchcore/src/vespa/searchcore/proton/reference/i_gid_to_lid_change_listener.h
@@ -16,10 +16,10 @@ namespace proton {
class IGidToLidChangeListener
{
public:
- using Context = std::shared_ptr<search::IDestructorCallback>;
+ using IDestructorCallbackSP = std::shared_ptr<search::IDestructorCallback>;
virtual ~IGidToLidChangeListener() { }
- virtual void notifyPutDone(Context context, document::GlobalId gid, uint32_t lid) = 0;
- virtual void notifyRemove(Context context, document::GlobalId gid) = 0;
+ virtual void notifyPutDone(IDestructorCallbackSP context, document::GlobalId gid, uint32_t lid) = 0;
+ virtual void notifyRemove(IDestructorCallbackSP context, document::GlobalId gid) = 0;
virtual void notifyRegistered() = 0;
virtual const vespalib::string &getName() const = 0;
virtual const vespalib::string &getDocTypeName() const = 0;
diff --git a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
index 6e243951386..bd5f2775735 100644
--- a/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/storeonlyfeedview.cpp
@@ -670,7 +670,7 @@ StoreOnlyFeedView::removeDocuments(const RemoveDocumentsOperation &op, bool remo
vespalib::Gate gate;
gidsToRemove = getGidsToRemove(_metaStore, lidsToRemove);
{
- IGidToLidChangeHandler::Context context = std::make_shared<search::GateCallback>(gate);
+ IGidToLidChangeHandler::IDestructorCallbackSP context = std::make_shared<search::GateCallback>(gate);
for (const auto &gid : gidsToRemove) {
_gidToLidChangeHandler.notifyRemove(context, gid, serialNum);
}
diff --git a/searchcore/src/vespa/searchcore/proton/test/mock_gid_to_lid_change_handler.h b/searchcore/src/vespa/searchcore/proton/test/mock_gid_to_lid_change_handler.h
index 69e4af49f5f..e808f721e83 100644
--- a/searchcore/src/vespa/searchcore/proton/test/mock_gid_to_lid_change_handler.h
+++ b/searchcore/src/vespa/searchcore/proton/test/mock_gid_to_lid_change_handler.h
@@ -42,8 +42,8 @@ public:
_removes.emplace_back(docTypeName, keepNames);
}
- void notifyPutDone(Context, document::GlobalId, uint32_t, SerialNum) override { }
- void notifyRemove(Context, document::GlobalId, SerialNum) override { }
+ void notifyPutDone(IDestructorCallbackSP, document::GlobalId, uint32_t, SerialNum) override { }
+ void notifyRemove(IDestructorCallbackSP, document::GlobalId, SerialNum) override { }
void notifyRemoveDone(document::GlobalId, SerialNum) override { }
void assertAdds(const std::vector<AddEntry> &expAdds)