summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2020-10-23 19:06:38 +0200
committerJon Bratseth <bratseth@gmail.com>2020-10-23 19:06:38 +0200
commitb91259635e9af7d80bb6225d8c7310552667e51d (patch)
treed7fb81708b03063d7b914e8f0f64351d32aae7da
parentf0ca34c31c48cfcfe0817b53d7d564339fa2564e (diff)
Clarify consequences of calling toNode
-rw-r--r--node-repository/src/main/java/com/yahoo/vespa/hosted/provision/provisioning/NodeCandidate.java6
1 files changed, 5 insertions, 1 deletions
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<NodeCandidate> {
/** 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 */