void reservePort(NetworkPortRequestor service, int port) {
        if (portDB.containsKey(port)) {
            portAlreadyReserved(service, port);
        }
        if (inVespasPortRange(port)) {
            allocatedPorts++;
            if (allocatedPorts > MAX_PORTS) {
                noMoreAvailablePorts();
            }
        }
        portDB.put(port, service);
    }
Reserves the desired port for the given service, or throws as exception if the port
is not available.

@param service the service that wishes to reserve the port.
@param port the port to be reserved.
config-model/src/main/java/com/yahoo/vespa/model/HostPorts.java