Restore a group of archived servers to a specified group
@param servers servers references
@return OperationFuture wrapper for list of ServerRef
320948
OperationFuture<List<Server>> restore(String groupId, Server... servers) {
        return restore(Arrays.asList(servers), groupId);
    }
366784
public OperationFuture<List<Server>> startMaintenance(Group... groups) {
        return serverService().startMaintenance(
            getServerSearchCriteria(groups)
        );
    }
753100
public Deployment setServerGroups(final Collection<String> serverGroups) {
        this.serverGroups.clear();
        this.serverGroups.addAll(serverGroups);
        return this;
    }
151926
@Override
    @Deprecated
    public void loadServerInstances(final String serverGroup, final AsyncCallback<List<ServerInstance>> callback) {
        final List<ServerInstance> instancesOfGroup = new LinkedList<ServerInstance>();
        loadHostsAndServerInstances(new SimpleCallback<List<HostInfo>>() {
            @Override
            public void onSuccess(final List<HostInfo> result) {
                for (HostInfo host : result) {
                    List<ServerInstance> instances = host.getServerInstances();
                    for (ServerInstance instance : instances) {
                        if (serverGroup == null) {
                            instancesOfGroup.add(instance);
                        } else if (instance.getGroup().equals(instance.getGroup())) {
                            instancesOfGroup.add(instance);
                        }
                    }
                }
                callback.onSuccess(instancesOfGroup);
            }
        });
    }
950634
private void parseServers(List<String> servers){
        if(servers != null && servers.size() > 0){
            this.servers = new ArrayList<InetSocketAddress>();
            for(String server : servers){
                String[] ss = server.split(":");
                if(ss.length == 2){
                    String host = ss[0];
                    int port = 0;
                    try{
                        port = Integer.valueOf(ss[1]);
                    } catch(NumberFormatException e){
                        // do nothing.
                    }
                    if(validateServer(host, port)){
                        this.servers.add(InetSocketAddress.createUnresolved(host, port));
                    }
                }
            }
        }
    }
811769
private static <K> LinkedHashMap<K, TypeSerializer<?>> restoreSerializers(LinkedHashMap<K, TypeSerializerSnapshot<?>> snapshotsMap) {
		final LinkedHashMap<K, TypeSerializer<?>> restoredSerializersMap = new LinkedHashMap<>(snapshotsMap.size());
		snapshotsMap.forEach((key, snapshot) -> restoredSerializersMap.put(key, snapshot.restoreSerializer()));
		return restoredSerializersMap;
	}
737045
@Deprecated
    public ListGroupsResult withGroups(java.util.Collection<Group> groups) {
        setGroups(groups);
        return this;
    }
504541
private OperationFuture<Group> createServers(GroupHierarchyConfig config, String rootGroupId) {
        List<CreateServerConfig> configs = config.getServerConfigs();

        List<JobFuture> futures = configs.stream()
            .map(serverConfig -> serverService().create(serverConfig).jobFuture())
            .collect(toList());

        return new OperationFuture<>(Group.refById(rootGroupId), new ParallelJobsFuture(futures));
    }
259344
public void setServers(java.util.Collection<ListedServer> servers) {
        if (servers == null) {
            this.servers = null;
            return;
        }

        this.servers = new java.util.ArrayList<ListedServer>(servers);
    }
1056397
public Collection<Server> list(List<String> queryParams)
    {
        return HTTP.GET("/v2/servers.json", null, queryParams, SERVERS).get();
    }
611733
public void resetConnections(MemberId leader, Collection<MemberId> servers) {
    selectorManager.resetAll(leader, servers);
  }
261309
OperationFuture<List<Server>> restore(List<Server> serverList, String groupId) {
        List<JobFuture> futures = serverList.stream()
            .map(server ->
                baseServerResponse(
                    client.restore(
                        idByRef(server),
                        new RestoreServerRequest()
                            .targetGroupId(groupId))
                )
                .jobFuture()
            )
            .collect(toList());

        return new OperationFuture<>(
            serverList,
            new ParallelJobsFuture(futures)
        );
    }
592624
@Override
    public void addMBeanServers(Set<MBeanServerConnection> servers) {
        try {
            /*
			 * this.mbeanServer = AdminServiceFactory.getMBeanFactory().getMBeanServer();
			 */
            Class adminServiceClass = ClassUtil.classForName("com.ibm.websphere.management.AdminServiceFactory",getClass().getClassLoader());
            if (adminServiceClass != null) {
                Method getMBeanFactoryMethod = adminServiceClass.getMethod("getMBeanFactory", new Class[0]);
                Object mbeanFactory = getMBeanFactoryMethod.invoke(null);
                if (mbeanFactory != null) {
                    Method getMBeanServerMethod = mbeanFactory.getClass().getMethod("getMBeanServer", new Class[0]);
                    servers.add((MBeanServer) getMBeanServerMethod.invoke(mbeanFactory));
                }
            }
        }
        catch (InvocationTargetException ex) {
            // CNFE should be earlier
            throw new IllegalArgumentException(INTERNAL_ERROR_MSG,ex);
        } catch (IllegalAccessException ex) {
            throw new IllegalArgumentException(INTERNAL_ERROR_MSG,ex);
        } catch (NoSuchMethodException ex) {
            throw new IllegalArgumentException(INTERNAL_ERROR_MSG,ex);
        }
    }
35711
public OperationFuture<Server> delete(Server server) {
        BaseServerResponse response = client.delete(idByRef(server));

        return new OperationFuture<>(
            server,
            response.findStatusId(),
            queueClient
        );
    }
695121
public ClientConnection reset(Address leader, Collection<Address> servers) {
    selector.reset(leader, servers);
    return this;
  }
349528
private List<ServerConnection> updateServerList() {
        final Map<Endpoint, ServerConnection> allServersByEndpoint = allServers
                .stream()
                .collect(toImmutableMap(ServerConnection::endpoint,
                                        Function.identity(),
                                        (l, r) -> l));
        return allServers = delegate
                .endpoints()
                .stream()
                .map(endpoint -> {
                    ServerConnection connection = allServersByEndpoint.get(endpoint);
                    if (connection != null) {
                        return connection;
                    }
                    return new ServerConnection(endpoint, createEndpointHealthChecker(endpoint));
                })
                .collect(toImmutableList());
    }
848303
public AddressSelector reset(Address leader, Collection<Address> servers) {
    if (changed(leader, servers)) {
      this.leader = leader;
      this.servers = servers;
      this.selections = strategy.selectConnections(leader, new ArrayList<>(servers));
      this.selectionsIterator = null;
    }
    return this;
  }