servers.add(server);
}
private void processBackServer(Map<Server, Long> servers, RouterConfig routerConfig, Map<String, Long> numbers) {
Map<Server, Map<Server, Long>> backServers = new LinkedHashMap<Server, Map<Server, Long>>();
Server backUpServer = m_configManager.queryBackUpServer();
Collection<Domain> values = routerConfig.getDomains().values();
for (Domain domain : values) {
List<Server> domainServers = domain.getServers();
String domainName = domain.getId();
Domain defaultDomainConfig = m_configManager.getRouterConfig().getDomains().get(domainName);
if (defaultDomainConfig == null) {
Server server = domain.getServers().get(0);
Map<Server, Long> serverProcess = backServers.get(server);
if (serverProcess == null) {
serverProcess = new LinkedHashMap<Server, Long>();
for (Entry<Server, Long> entry : servers.entrySet()) {
if (!entry.getKey().equals(server)) {
serverProcess.put(entry.getKey(), entry.getValue());
}
}
backServers.put(server, serverProcess);
}
Server nextServer = findMinProcessServer(serverProcess);
if (nextServer != null) {
Long oldValue = serverProcess.get(nextServer);
serverProcess.put(nextServer, oldValue + numbers.get(domain.getId()));