aboutsummaryrefslogtreecommitdiffstats
path: root/vdslib/src/vespa/vdslib/state/clusterstate.h
diff options
context:
space:
mode:
Diffstat (limited to 'vdslib/src/vespa/vdslib/state/clusterstate.h')
-rw-r--r--vdslib/src/vespa/vdslib/state/clusterstate.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/vdslib/src/vespa/vdslib/state/clusterstate.h b/vdslib/src/vespa/vdslib/state/clusterstate.h
index 70f4d59977a..4cf8ba20d81 100644
--- a/vdslib/src/vespa/vdslib/state/clusterstate.h
+++ b/vdslib/src/vespa/vdslib/state/clusterstate.h
@@ -10,7 +10,7 @@
#include "node.h"
#include "nodestate.h"
-#include <map>
+#include <vespa/vespalib/stllike/hash_map.h>
#include <array>
namespace storage::lib {
@@ -22,7 +22,8 @@ struct SeparatorPrinter;
class ClusterState : public document::Printable {
public:
- using NodeMap = std::map<Node, NodeState>;
+ using NodeStatePair = std::pair<Node, NodeState>;
+ using NodeMap = vespalib::hash_map<Node, NodeState>;
using NodeCounts = std::array<uint16_t, 2>;
using CSP = std::shared_ptr<const ClusterState>;
using SP = std::shared_ptr<ClusterState>;
@@ -71,7 +72,8 @@ private:
void printStateGroupwise(std::ostream& out, const Group&, bool verbose, const std::string& indent, bool rootGroup) const;
void getTextualDifference(std::ostringstream& builder, const NodeType& type, const ClusterState& other) const;
size_t printStateGroupwise(std::ostream& out, const Group&, bool verbose, const std::string& indent, const NodeType& type) const;
- void serialize_nodes(vespalib::asciistream & out, bool ignoreNewFeatures, SeparatorPrinter & sep, const NodeType & nodeType) const;
+ void serialize_nodes(vespalib::asciistream & out, bool ignoreNewFeatures, SeparatorPrinter & sep,
+ const NodeType & nodeType, const std::vector<NodeStatePair> & nodeStates) const;
uint32_t _version;
NodeCounts _nodeCount;
const State* _clusterState;