public ServerStatus restartServer(String serverManagerName, String serverName, long gracefulShutdownTimeout, TimeUnit timeUnit) {
long ms = gracefulShutdownTimeout < 0 ? - 1 : timeUnit.toMillis(gracefulShutdownTimeout);
try {
return new RestartServerOperation(serverManagerName, serverName, ms).executeForResult(getConnectionStrategy());
} catch (Exception e) {
throw new ManagementException("Failed to restart server " + serverName, e);
}
}