@Override
    public synchronized void verifyHosts(ApplicationId applicationId, Collection<String> newHosts) {
        for (String host : newHosts) {
            if (hostAlreadyTaken(host, applicationId)) {
                throw new IllegalArgumentException("'" + applicationId + "' tried to allocate host '" + host +
                                                   "', but the host is already taken by '" + host2ApplicationId.get(host) + "'");
            }
        }
    }
A host registry with a mapping between hosts (hostname as a String) and some type T
TODO: Maybe we should have a Host type, but using String for now.

@author Ulf Lilleengen
configserver/src/main/java/com/yahoo/vespa/config/server/host/HostRegistry.java