diff options
author | Geir Storli <geirst@oath.com> | 2018-04-19 10:40:03 +0000 |
---|---|---|
committer | Geir Storli <geirst@oath.com> | 2018-04-19 10:42:21 +0000 |
commit | 6a26d4ed5021be4ed75727167fbf194ec3faba12 (patch) | |
tree | 5567b626e4371e1a626aa77eb0d02c215675d3c8 /searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h | |
parent | 1e0a2f24d4159edf46b5b457f07b33121d7e5bbf (diff) |
Add ReadableAttributeVector interface used to create a short-lived read guard over an attribute vector.
Let AttributeVector and ImportedAttributeVector implement this interface.
Diffstat (limited to 'searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h')
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h index 731b0bbbd19..fa5470d2449 100644 --- a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h +++ b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h @@ -2,6 +2,7 @@ #pragma once +#include "readable_attribute_vector.h" #include "reference_attribute.h" #include <vespa/vespalib/stllike/string.h> #include <memory> @@ -26,7 +27,7 @@ class BitVectorSearchCache; * Any accessor on the imported attribute for a local LID yields the same result as * if the same accessor were invoked with the target LID on the target attribute vector. */ -class ImportedAttributeVector { +class ImportedAttributeVector : public ReadableAttributeVector { public: using SP = std::shared_ptr<ImportedAttributeVector>; ImportedAttributeVector(vespalib::stringref name, @@ -58,10 +59,7 @@ public: return _name; } - /* - * Create an imported attribute with a snapshot of lid to lid mapping. - */ - virtual std::unique_ptr<IAttributeVector> makeReadGuard(bool stableEnumGuard) const; + virtual std::unique_ptr<AttributeReadGuard> makeReadGuard(bool stableEnumGuard) const override; protected: vespalib::string _name; |