diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-11-27 05:49:51 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-11-27 11:56:10 +0000 |
commit | 17d0bc7e91a0c055f57b002b6f501fea36235f99 (patch) | |
tree | 220ed4d472b0ceb4e928a955c007328425d99233 /documentapi | |
parent | 39d00826c3e7e30d59e6ca6d88eb3f36fb8358fd (diff) |
GC LoadType and PriorityMapper.
Diffstat (limited to 'documentapi')
6 files changed, 1 insertions, 67 deletions
diff --git a/documentapi/CMakeLists.txt b/documentapi/CMakeLists.txt index 3a6ce0e3a8d..855fd7ad0e6 100644 --- a/documentapi/CMakeLists.txt +++ b/documentapi/CMakeLists.txt @@ -15,7 +15,6 @@ vespa_define_module( LIBS src/vespa/documentapi - src/vespa/documentapi/loadtypes src/vespa/documentapi/messagebus src/vespa/documentapi/messagebus/messages src/vespa/documentapi/messagebus/policies diff --git a/documentapi/src/vespa/documentapi/CMakeLists.txt b/documentapi/src/vespa/documentapi/CMakeLists.txt index 46bc0239834..3011259f856 100644 --- a/documentapi/src/vespa/documentapi/CMakeLists.txt +++ b/documentapi/src/vespa/documentapi/CMakeLists.txt @@ -4,7 +4,6 @@ vespa_add_library(documentapi $<TARGET_OBJECTS:documentapi_documentapimessagebus> $<TARGET_OBJECTS:documentapi_documentapimessages> $<TARGET_OBJECTS:documentapi_documentapipolicies> - $<TARGET_OBJECTS:documentapi_documentapiloadtypes> INSTALL lib64 DEPENDS ) diff --git a/documentapi/src/vespa/documentapi/loadtypes/CMakeLists.txt b/documentapi/src/vespa/documentapi/loadtypes/CMakeLists.txt deleted file mode 100644 index 84bc871b452..00000000000 --- a/documentapi/src/vespa/documentapi/loadtypes/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -vespa_add_library(documentapi_documentapiloadtypes OBJECT - SOURCES - loadtype.cpp - DEPENDS -) diff --git a/documentapi/src/vespa/documentapi/loadtypes/loadtype.cpp b/documentapi/src/vespa/documentapi/loadtypes/loadtype.cpp deleted file mode 100644 index 5dfdfb0bc09..00000000000 --- a/documentapi/src/vespa/documentapi/loadtypes/loadtype.cpp +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#include "loadtype.h" -#include <vespa/vespalib/stllike/asciistream.h> - -namespace documentapi { - -const LoadType LoadType::DEFAULT(0, "default", Priority::PRI_NORMAL_3); - -void -LoadType::print(vespalib::asciistream & os) const -{ - os << "LoadType(" << getId() << ": " << getName() << ")"; -} - -} // documentapi diff --git a/documentapi/src/vespa/documentapi/loadtypes/loadtype.h b/documentapi/src/vespa/documentapi/loadtypes/loadtype.h deleted file mode 100644 index a18142e78bd..00000000000 --- a/documentapi/src/vespa/documentapi/loadtypes/loadtype.h +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -/** - * \class LoadType - * \ingroup loadtype - * - * \brief Class used to identify a given load type. - * - * A load type is a type given to a Vespa operation that is independent of the - * message type, priority or such information. Load types are given by clients - * to external load (if not given, default load type is used), and might also be - * set by the system itself for maintenance load. - */ - -#pragma once - -#include <vespa/metrics/loadtype.h> -#include <vespa/documentapi/messagebus/priority.h> - -namespace vespalib { - class asciistream; -} - -namespace documentapi { - -// Inherit metrics loadtype so it is easy to use load types in load metrics. -class LoadType : public metrics::LoadType { - Priority::Value _priority; - -public: - using UP = std::unique_ptr<LoadType>; - - LoadType(uint32_t id, const string& name, Priority::Value priority) - : metrics::LoadType(id, name), _priority(priority) {} - static const LoadType DEFAULT; - - Priority::Value getPriority() const { return _priority; } -private: - void print(vespalib::asciistream & os) const; -}; - -} diff --git a/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp b/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp index 3af4e6ee23d..8202e938bde 100644 --- a/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp +++ b/documentapi/src/vespa/documentapi/messagebus/routablefactories60.cpp @@ -7,7 +7,6 @@ #include <vespa/document/select/parser.h> #include <vespa/document/update/documentupdate.h> #include <vespa/documentapi/documentapi.h> -#include <vespa/documentapi/loadtypes/loadtype.h> #include <vespa/vespalib/objects/nbostream.h> using document::FixedBucketSpaces; @@ -22,7 +21,7 @@ RoutableFactories60::DocumentMessageFactory::encode(const mbus::Routable &obj, v { const auto &msg = static_cast<const DocumentMessage&>(obj); out.putByte(msg.getPriority()); - out.putInt(LoadType::DEFAULT.getId()); + out.putInt(0); // LoadType return doEncode(msg, out); } |