diff options
author | Arne Juul <arnej@yahoo-inc.com> | 2019-08-05 07:48:45 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahoo-inc.com> | 2019-08-06 06:43:02 +0000 |
commit | 211cb30e6a61fa5aa0a43ad8e09239492e9cab18 (patch) | |
tree | 7bc2d8942d206b6daebc0ed47e5f9b8e3a6b4257 /config-model/src/main/java/com/yahoo/vespa/model/NetworkPortRequestor.java | |
parent | 35283b454dfdaa9acbcea24274e01e65d128b7b6 (diff) |
retry: refactor requestor api
* add and switch to API for explicitly allocating network ports
* remove now-unused getPortSuffixes
* remove now-unused requiresConsecutivePorts
* remove now-unused reservePortPrepended
Diffstat (limited to 'config-model/src/main/java/com/yahoo/vespa/model/NetworkPortRequestor.java')
-rw-r--r-- | config-model/src/main/java/com/yahoo/vespa/model/NetworkPortRequestor.java | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/NetworkPortRequestor.java b/config-model/src/main/java/com/yahoo/vespa/model/NetworkPortRequestor.java index 96870ee30d8..f8337219f54 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/NetworkPortRequestor.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/NetworkPortRequestor.java @@ -26,6 +26,9 @@ public interface NetworkPortRequestor { */ default int getWantedPort() { return 0; } + /** allocate the ports you need */ + void allocatePorts(int start, PortAllocBridge from); + /** * Returns the number of ports needed by this service. * User-defined ports for container http servers should not be counted, as those @@ -41,18 +44,4 @@ public interface NetworkPortRequestor { * @return true if this Service requires the wanted base port. */ default boolean requiresWantedPort() { return false; } - - /** - * Override if the services does not require consecutive port numbers. I.e. if any ports - * in addition to the baseport should be allocated from Vespa's default port range. - * - * @return true by default - */ - default boolean requiresConsecutivePorts() { return true; } - - /** - * Return names for each port requested. - * The size of the returned array must be equal to getPortCount(). - */ - String[] getPortSuffixes(); } |