From b91259635e9af7d80bb6225d8c7310552667e51d Mon Sep 17 00:00:00 2001 From: Jon Bratseth Date: Fri, 23 Oct 2020 19:06:38 +0200 Subject: Clarify consequences of calling toNode --- .../yahoo/vespa/hosted/provision/provisioning/NodeCandidate.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'node-repository') diff --git a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/NodeCandidate.java b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/NodeCandidate.java index a8457eef374..02086e2bace 100644 --- a/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/NodeCandidate.java +++ b/node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/NodeCandidate.java @@ -87,7 +87,11 @@ abstract class NodeCandidate implements Nodelike, Comparable { /** Returns a copy of this with exclusive switch set to given value */ public abstract NodeCandidate withExclusiveSwitch(boolean exclusiveSwitch); - /** Returns the node instance of this candidate, or an invalid node if it cannot be created */ + /** + * Returns the node instance of this candidate, allocating it if necessary. + * + * @throws IllegalStateException if the node candidate is invalid + */ public abstract Node toNode(); /** Returns whether this node can - as far as we know - be used to run the application workload */ -- cgit v1.2.3