aboutsummaryrefslogtreecommitdiffstats
path: root/config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2019-03-04 13:07:47 +0000
committerArne Juul <arnej@yahoo-inc.com>2019-03-04 13:07:47 +0000
commitac24414fe5a6887343d85c94a9faed52052fc4d4 (patch)
tree88857c03192576ea773a2ab904e3e68af04b1598 /config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java
parent5bd754273e36fb325eef738d896e182be66456df (diff)
only consider port free it was unused in saved allocations too
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java b/config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java
index 78d3a7670c7..5604dfa19b0 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java
@@ -51,6 +51,10 @@ public class PortFinder {
return port;
}
+ public boolean isFree(int port) {
+ return !byPorts.containsKey(port);
+ }
+
public PortFinder(Collection<Allocation> allocations) {
for (Allocation a : allocations) {
use(a);