diff options
Diffstat (limited to 'storageserver/src/vespa/storageserver/app/process.h')
-rw-r--r-- | storageserver/src/vespa/storageserver/app/process.h | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/storageserver/src/vespa/storageserver/app/process.h b/storageserver/src/vespa/storageserver/app/process.h index 7050dca6b92..72b399ac870 100644 --- a/storageserver/src/vespa/storageserver/app/process.h +++ b/storageserver/src/vespa/storageserver/app/process.h @@ -1,4 +1,4 @@ -// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. /** * \class storage::Process * @@ -8,16 +8,21 @@ * contains the process as a library such that it can be tested and used in * other pieces of code. * - * Specializations of this class will exist to add the funcionality needed for + * Specializations of this class will exist to add the functionality needed for * the various process types. */ #pragma once +#include <vespa/config-bucketspaces.h> +#include <vespa/config-stor-distribution.h> +#include <vespa/config/subscription/configsubscriber.h> +#include <vespa/config/subscription/configuri.h> #include <vespa/document/config/config-documenttypes.h> +#include <vespa/storage/config/config-stor-bouncer.h> +#include <vespa/storage/config/config-stor-communicationmanager.h> +#include <vespa/storage/config/config-stor-server.h> #include <vespa/storage/storageserver/applicationgenerationfetcher.h> -#include <vespa/config/subscription/configuri.h> -#include <vespa/config/subscription/configsubscriber.h> namespace document { class DocumentTypeRepo; } @@ -28,19 +33,32 @@ struct StorageNodeContext; class Process : public ApplicationGenerationFetcher { protected: + using DocumentTypesConfig = document::config::DocumenttypesConfig; + using BucketspacesConfig = vespa::config::content::core::BucketspacesConfig; + using CommunicationManagerConfig = vespa::config::content::core::StorCommunicationmanagerConfig; + using StorBouncerConfig = vespa::config::content::core::StorBouncerConfig; + using StorDistributionConfig = vespa::config::content::StorDistributionConfig; + using StorServerConfig = vespa::config::content::core::StorServerConfig; + using DocumentTypeRepoSP = std::shared_ptr<const document::DocumentTypeRepo>; config::ConfigUri _configUri; DocumentTypeRepoSP getTypeRepo() { return _repos.back(); } config::ConfigSubscriber _configSubscriber; + std::unique_ptr<config::ConfigHandle<DocumentTypesConfig>> _document_cfg_handle; + std::unique_ptr<config::ConfigHandle<BucketspacesConfig>> _bucket_spaces_cfg_handle; + std::unique_ptr<config::ConfigHandle<CommunicationManagerConfig>> _comm_mgr_cfg_handle; + std::unique_ptr<config::ConfigHandle<StorBouncerConfig>> _bouncer_cfg_handle; + std::unique_ptr<config::ConfigHandle<StorDistributionConfig>> _distribution_cfg_handle; + std::unique_ptr<config::ConfigHandle<StorServerConfig>> _server_cfg_handle; + private: - config::ConfigHandle<document::config::DocumenttypesConfig>::UP _documentHandler; std::vector<DocumentTypeRepoSP> _repos; public: using UP = std::unique_ptr<Process>; - Process(const config::ConfigUri & configUri); + explicit Process(const config::ConfigUri & configUri); ~Process() override; virtual void setupConfig(vespalib::duration subscribeTimeout); |