aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentCluster.java
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@yahooinc.com>2022-04-19 14:33:40 +0200
committerHåkon Hallingstad <hakon@yahooinc.com>2022-04-19 14:33:40 +0200
commit1254d92bd6254a70754da2f5487574add350ccb1 (patch)
tree242b8ba85b813c370794fd5b5cbbeddd5de69dba /clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentCluster.java
parentdd28e17023492c9dd67084c0a5ea0467101a60e9 (diff)
Use plural for methods returning collection
Diffstat (limited to 'clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentCluster.java')
-rw-r--r--clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentCluster.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentCluster.java b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentCluster.java
index fabc4999fe5..579417cb8ae 100644
--- a/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentCluster.java
+++ b/clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ContentCluster.java
@@ -104,7 +104,7 @@ public class ContentCluster {
public void setDistribution(Distribution distribution) {
this.distribution = distribution;
- for (NodeInfo info : clusterInfo.getAllNodeInfo()) {
+ for (NodeInfo info : clusterInfo.getAllNodeInfos()) {
info.setGroup(distribution);
}
}
@@ -128,7 +128,7 @@ public class ContentCluster {
}
public void clearStates() {
- for (NodeInfo info : clusterInfo.getAllNodeInfo()) {
+ for (NodeInfo info : clusterInfo.getAllNodeInfos()) {
info.setReportedState(null, 0);
}
}
@@ -145,8 +145,8 @@ public class ContentCluster {
return clusterInfo.getConfiguredNodes();
}
- public Collection<NodeInfo> getNodeInfo() {
- return Collections.unmodifiableCollection(clusterInfo.getAllNodeInfo());
+ public Collection<NodeInfo> getNodeInfos() {
+ return Collections.unmodifiableCollection(clusterInfo.getAllNodeInfos());
}
public ClusterInfo clusterInfo() { return clusterInfo; }
@@ -158,7 +158,7 @@ public class ContentCluster {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("ContentCluster(").append(clusterName).append(") {");
- for (NodeInfo node : clusterInfo.getAllNodeInfo()) {
+ for (NodeInfo node : clusterInfo.getAllNodeInfos()) {
sb.append("\n ").append(node);
}
sb.append("\n}");
@@ -197,14 +197,14 @@ public class ContentCluster {
switch (state) {
case MAINTENANCE: // Orchestrator's ALLOWED_TO_BE_DOWN
case DOWN: // Orchestrator's PERMANENTLY_DOWN
- return clusterInfo.getStorageNodeInfo().stream()
- .filter(storageNodeInfo -> {
+ return clusterInfo.getStorageNodeInfos().stream()
+ .filter(storageNodeInfo -> {
NodeState userWantedState = storageNodeInfo.getUserWantedState();
return userWantedState.getState() == state &&
Objects.equals(userWantedState.getDescription(), ORCHESTRATOR_RESERVED_DESCRIPTION);
})
- .map(NodeInfo::getNodeIndex)
- .collect(Collectors.toList());
+ .map(NodeInfo::getNodeIndex)
+ .collect(Collectors.toList());
default:
// Note: There is no trace left if the Orchestrator set the state to UP, so that's handled
// like any other state: