diff options
author | Arne Juul <arnej@yahoo-inc.com> | 2019-03-04 13:07:47 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahoo-inc.com> | 2019-03-04 13:07:47 +0000 |
commit | ac24414fe5a6887343d85c94a9faed52052fc4d4 (patch) | |
tree | 88857c03192576ea773a2ab904e3e68af04b1598 /config-model/src/main/java/com/yahoo/vespa/model/PortFinder.java | |
parent | 5bd754273e36fb325eef738d896e182be66456df (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.java | 4 |
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); |