diff options
author | Tor Egge <Tor.Egge@oath.com> | 2018-06-06 13:48:04 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@oath.com> | 2018-06-06 13:48:04 +0000 |
commit | ccc96da3511e959a8957e1887ff5a6e6561f6e18 (patch) | |
tree | ad2f5f987b97153fb225a9055d2152030a01a42d | |
parent | 2b520727953523267c5e7cd3e652f255d62570b4 (diff) |
Simplify method names based on review feedback:
getHasStructFieldAttribute() => hasStructFieldAttribute()
getStructFieldAttribute() => isStructFieldAttribute()
5 files changed, 12 insertions, 12 deletions
diff --git a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp index c6b1cc7363c..31311482430 100644 --- a/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp +++ b/searchcore/src/tests/proton/documentdb/feedview/feedview_test.cpp @@ -389,7 +389,7 @@ struct MyAttributeWriter : public IAttributeWriter } void onReplayDone(uint32_t ) override { } - bool getHasStructFieldAttribute() const override { return false; } + bool hasStructFieldAttribute() const override { return false; } }; MyAttributeWriter::MyAttributeWriter(MyTracer &tracer) diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp index d66d47927fb..04a1e23ef73 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp +++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.cpp @@ -65,7 +65,7 @@ void AttributeWriter::WriteContext::add(AttributeVector &attr) { _fields.emplace_back(attr); - if (_fields.back().getStructFieldAttribute()) { + if (_fields.back().isStructFieldAttribute()) { _hasStructFieldAttribute = true; } } @@ -238,7 +238,7 @@ PutTask::PutTask(const AttributeWriter::WriteContext &wc, SerialNum serialNum, s const auto &fields = _wc.getFields(); _fieldValues.reserve(fields.size()); for (const auto &field : fields) { - if (_allAttributes || field.getStructFieldAttribute()) { + if (_allAttributes || field.isStructFieldAttribute()) { FieldValue::UP fv = _fieldExtractor->getFieldValue(field.getFieldPath()); _fieldValues.emplace_back(std::move(fv)); } @@ -255,7 +255,7 @@ PutTask::run() uint32_t fieldId = 0; const auto &fields = _wc.getFields(); for (auto field : fields) { - if (_allAttributes || field.getStructFieldAttribute()) { + if (_allAttributes || field.isStructFieldAttribute()) { AttributeVector &attr = field.getAttribute(); if (attr.getStatus().getLastSyncToken() < _serialNum) { applyPutToAttribute(_serialNum, _fieldValues[fieldId], _lid, _immediateCommit, attr, _onWriteDone); @@ -393,7 +393,7 @@ AttributeWriter::setupWriteContexts() _writeContexts.back().add(*fc.getAttribute()); } for (const auto &wc : _writeContexts) { - if (wc.getHasStructFieldAttribute()) { + if (wc.hasStructFieldAttribute()) { _hasStructFieldAttribute = true; } } @@ -418,7 +418,7 @@ AttributeWriter::internalPut(SerialNum serialNum, const Document &doc, DocumentI } auto extractor = std::make_shared<DocumentFieldExtractor>(doc); for (const auto &wc : _writeContexts) { - if (allAttributes || wc.getHasStructFieldAttribute()) { + if (allAttributes || wc.hasStructFieldAttribute()) { auto putTask = std::make_unique<PutTask>(wc, serialNum, extractor, lid, immediateCommit, allAttributes, onWriteDone); _attributeFieldWriter.executeTask(wc.getExecutorId(), std::move(putTask)); } @@ -593,7 +593,7 @@ AttributeWriter::compactLidSpace(uint32_t wantedLidLimit, SerialNum serialNum) } bool -AttributeWriter::getHasStructFieldAttribute() const +AttributeWriter::hasStructFieldAttribute() const { return _hasStructFieldAttribute; } diff --git a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h index eccbbdbfc71..f7e89a0a435 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/attribute_writer.h @@ -34,7 +34,7 @@ public: AttributeVector &getAttribute() const { return _attribute; } const FieldPath &getFieldPath() const { return _fieldPath; } void buildFieldPath(const DocumentType &docType); - bool getStructFieldAttribute() const { return _structFieldAttribute; } + bool isStructFieldAttribute() const { return _structFieldAttribute; } }; class WriteContext { @@ -50,7 +50,7 @@ public: void add(AttributeVector &attr); uint32_t getExecutorId() const { return _executorId; } const std::vector<WriteField> &getFields() const { return _fields; } - bool getHasStructFieldAttribute() const { return _hasStructFieldAttribute; } + bool hasStructFieldAttribute() const { return _hasStructFieldAttribute; } }; private: std::vector<WriteContext> _writeContexts; @@ -93,7 +93,7 @@ public: void forceCommit(SerialNum serialNum, OnWriteDoneType onWriteDone) override; void onReplayDone(uint32_t docIdLimit) override; - bool getHasStructFieldAttribute() const override; + bool hasStructFieldAttribute() const override; }; } // namespace proton diff --git a/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h b/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h index df6f9d50e36..4275acc7f80 100644 --- a/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h +++ b/searchcore/src/vespa/searchcore/proton/attribute/i_attribute_writer.h @@ -66,7 +66,7 @@ public: virtual void onReplayDone(uint32_t docIdLimit) = 0; - virtual bool getHasStructFieldAttribute() const = 0; + virtual bool hasStructFieldAttribute() const = 0; }; } // namespace proton diff --git a/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp b/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp index ab4b06080c2..c3c0add2b85 100644 --- a/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/fast_access_feed_view.cpp @@ -39,7 +39,7 @@ void FastAccessFeedView::updateAttributes(SerialNum serialNum, Lid lid, FutureDoc doc, bool immediateCommit, OnOperationDoneType onWriteDone) { - if (_attributeWriter->getHasStructFieldAttribute()) { + if (_attributeWriter->hasStructFieldAttribute()) { _attributeWriter->update(serialNum, *doc.get(), lid, immediateCommit, onWriteDone); } } |