class XenHypervisor implements HypervisorHost {

    protected void waitChangePoolMasterHost(Host master, Connection conn, String hostUuid) throws BadServerResponse, XenAPIException, XmlRpcException {
        int count = 0;
        while (hostUuid.equals(master.getUuid(conn))) {
            threadUtils.sleepThread(3);
            count++;
            if (count > 90) {
                throw new CloudRuntimeException(String.format("Could not shut down host [uuid=%s]; It was not possible to assign a new master to its pool", hostUuid));
            }
        }
    }

}