// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "document_db_flush_config.h" #include #include #include #include namespace proton { /** * The result after initializing components used by a document sub database. * * The document sub database takes ownership of these (initialized) components. */ class DocumentSubDbInitializerResult { private: std::shared_ptr _documentMetaStore; std::shared_ptr _summaryManager; std::shared_ptr _attributeManager; std::shared_ptr _indexManager; DocumentDBFlushConfig _flushConfig; public: DocumentSubDbInitializerResult(); std::shared_ptr writableDocumentMetaStore() { return _documentMetaStore; } DocumentMetaStoreInitializerResult::SP documentMetaStore() const { return *_documentMetaStore; } std::shared_ptr writableSummaryManager() { return _summaryManager; } SummaryManager::SP summaryManager() const { return *_summaryManager; } std::shared_ptr writableAttributeManager() { return _attributeManager; } AttributeManager::SP attributeManager() const { return *_attributeManager; } std::shared_ptr writableIndexManager() { return _indexManager; } searchcorespi::IIndexManager::SP indexManager() const { return *_indexManager; } void setFlushConfig(const DocumentDBFlushConfig &flushConfig); const DocumentDBFlushConfig &getFlushConfig() const { return _flushConfig; } }; } // namespace proton