/** * Shuts down all the servers on given {@code host} gracefully. As opposed to * {@link Administration#shutdownGracefully(int)}, this doesn't shut down the entire host, just the servers. * * @param timeoutInSeconds if {@code == 0}, then the server will shutdown immediately without waiting * for the active requests to finish; if {@code <= 0}, then the server will wait indefinitely for the active * requests to finish */ public void shutdownAllServersGracefully(String host, int timeoutInSeconds) throws InterruptedException, TimeoutException, IOException { shutdownServersGracefully(host, allRunningServers(host), timeoutInSeconds); }
/** * Restarts all the servers on given {@code host}. As opposed to {@link Administration#restart()}, this doesn't * restart the entire host, just the servers. */ public void restartAllServers(String host) throws InterruptedException, TimeoutException, IOException { restartServers(host, allRunningServers(host)); }
/** * Shuts down all the servers on given {@code host}. As opposed to {@link Administration#shutdown()}, this doesn't * shut down the entire host, just the servers. */ public void shutdownAllServers(String host) throws InterruptedException, TimeoutException, IOException { shutdownServers(host, allRunningServers(host)); }
/** Restarts given {@code server} on given {@code host}. */ public void restartServer(String host, String server) throws InterruptedException, TimeoutException, IOException { restartServers(host, Collections.singletonList(server)); }
/** * Reloads given {@code host} if required. Reloading the host includes restarting all its servers. * This is a variant of {@link Administration#reloadIfRequired()}. */ public boolean reloadIfRequired(String host) throws IOException, InterruptedException, TimeoutException { if (domainOps.isRestartOperationRequired(host, CommonRestartOperation.RELOAD)) { reload(host); return true; } return false; }
/** Restarts given {@code host} if required. This is a variant of {@link Administration#restartIfRequired()}. */ public boolean restartIfRequired(String host) throws IOException, InterruptedException, TimeoutException { if (domainOps.isRestartOperationRequired(host, CommonRestartOperation.RESTART)) { restart(host); return true; } return false; }
/** @see #shutdownAllServers(String) */ public void shutdownAllServersGracefully(int timeoutInSeconds) throws InterruptedException, IOException, TimeoutException { shutdownAllServersGracefully(client.options().defaultHost, timeoutInSeconds); }
/** @see #restartServer(String, String) */ public void restartServer(String server) throws InterruptedException, TimeoutException, IOException { restartServer(client.options().defaultHost, server); }
/** @see #removeServer(String, String) */ public boolean removeServer(String server) throws IOException, OperationException { return removeServer(client.options().defaultHost, server); }
/** @see #restartAllServers(String) */ public void restartAllServers() throws InterruptedException, IOException, TimeoutException { restartAllServers(client.options().defaultHost); }
/** @see #shutdownAllServers(String) */ public void shutdownAllServers() throws InterruptedException, IOException, TimeoutException { shutdownAllServers(client.options().defaultHost); }
/** @see #allServers(String) */ public List<String> allServers() throws IOException { return allServers(client.options().defaultHost); }
/** @see #allRunningServers(String) */ public List<String> allRunningServers() throws IOException { return allRunningServers(client.options().defaultHost); }