diff options
author | Tor Brede Vekterli <vekterli@yahoo-inc.com> | 2017-02-27 15:53:44 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahoo-inc.com> | 2017-02-27 15:53:44 +0000 |
commit | 18fcf694dde62a9a2b717945feabab34ce371a2e (patch) | |
tree | 3af7bbf0ec38923d0a2dcc393ac70b9d1a61be9c /searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h | |
parent | 69eab7d83a53d58cb8d762ad25174cf80fa3c873 (diff) |
Add attribute guards for imported attribute vectors
Diffstat (limited to 'searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h')
-rw-r--r-- | searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h index 97f1606f125..12b72dde057 100644 --- a/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h +++ b/searchlib/src/vespa/searchlib/attribute/imported_attribute_vector.h @@ -8,6 +8,10 @@ #include <memory> namespace search { + +class AttributeGuard; +class AttributeEnumGuard; + namespace attribute { /** @@ -57,6 +61,21 @@ public: return _target_attribute; } + /** + * Acquire an opaque composite guard that covers both the target attribute and + * the reference attribute. Note that these are not directly accessible via the + * returned guard object itself; it does not expose a valid pointer (i.e. get() will + * return nullptr). + */ + std::unique_ptr<AttributeGuard> acquireGuard() const; + /** + * Acquires a composite guard similar to acquireGuard(), but the target attribute is + * covered by an AttributeEnumGuard instead of a regular AttributeGuard. + * + * The reference attribute is _not_ covered by an enum guard. + */ + std::unique_ptr<AttributeEnumGuard> acquireEnumGuard() const; + private: long onSerializeForAscendingSort(DocId doc, void * serTo, long available, const common::BlobConverter * bc) const override; |