diff options
author | Håkon Hallingstad <hakon@verizonmedia.com> | 2019-02-15 15:11:17 +0100 |
---|---|---|
committer | Håkon Hallingstad <hakon@verizonmedia.com> | 2019-02-15 15:11:17 +0100 |
commit | cce9a760244d31087eba3e2191aaa36c58d48e28 (patch) | |
tree | cd23cc0e4646940f21d7d783f56be2db0c24e08a /node-repository | |
parent | ac25dfa3eb8a00802626fbbcf7dd0fee588bb517 (diff) |
Use same parameter ordering for park and move
Diffstat (limited to 'node-repository')
-rw-r--r-- | node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java index c3831c33723..bc2e729b791 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/NodeRepository.java @@ -452,7 +452,7 @@ public class NodeRepository extends AbstractComponent { * @throws NoSuchNodeException if the node is not found */ public Node fail(String hostname, Agent agent, String reason) { - return move(hostname, Node.State.failed, agent, Optional.of(reason), true); + return move(hostname, true, Node.State.failed, agent, Optional.of(reason)); } /** @@ -471,7 +471,7 @@ public class NodeRepository extends AbstractComponent { * @throws NoSuchNodeException if the node is not found */ public Node park(String hostname, boolean keepAllocation, Agent agent, String reason) { - return move(hostname, Node.State.parked, agent, Optional.of(reason), keepAllocation); + return move(hostname, keepAllocation, Node.State.parked, agent, Optional.of(reason)); } /** @@ -490,7 +490,7 @@ public class NodeRepository extends AbstractComponent { * @throws NoSuchNodeException if the node is not found */ public Node reactivate(String hostname, Agent agent, String reason) { - return move(hostname, Node.State.active, agent, Optional.of(reason), true); + return move(hostname, true, Node.State.active, agent, Optional.of(reason)); } private List<Node> moveRecursively(String hostname, Node.State toState, Agent agent, Optional<String> reason) { @@ -498,11 +498,11 @@ public class NodeRepository extends AbstractComponent { .map(child -> move(child, toState, agent, reason)) .collect(Collectors.toList()); - moved.add(move(hostname, toState, agent, reason, true)); + moved.add(move(hostname, true, toState, agent, reason)); return moved; } - private Node move(String hostname, Node.State toState, Agent agent, Optional<String> reason, boolean keepAllocation) { + private Node move(String hostname, boolean keepAllocation, Node.State toState, Agent agent, Optional<String> reason) { Node node = getNode(hostname).orElseThrow(() -> new NoSuchNodeException("Could not move " + hostname + " to " + toState + ": Node not found")); |