private void waitForRestart() { if (isError()) return; long deadline = System.currentTimeMillis() + WAIT_TIME_MS; while (System.currentTimeMillis() < deadline) { try { String newpid = getPid(); // when the next statement is true -- the server has restarted. if (StringUtils.ok(newpid) && !newpid.equals(oldPid)) { if (logger.isLoggable(Level.FINE)) logger.fine("Restarted instance pid = " + newpid); return; } } catch (Exception e) { // ignore. This is normal! } } setError(Strings.get("restart.instance.timeout", instanceName)); }
private void waitForRestart() { if (isError()) return; long deadline = System.currentTimeMillis() + WAIT_TIME_MS; while (System.currentTimeMillis() < deadline) { try { String newpid = getPid(); // when the next statement is true -- the server has restarted. if (StringUtils.ok(newpid) && !newpid.equals(oldPid)) { logger.fine("Restarted instance pid = " + newpid); return; } } catch (Exception e) { // ignore. This is normal! } } setError(Strings.get("restart.instance.timeout", instanceName)); }
private void setOldPid() throws CommandException { if (isError()) return; oldPid = getPid(); if (!StringUtils.ok(oldPid)) setError(Strings.get("restart.instance.nopid", instanceName)); }
private void setOldPid() throws CommandException { if (isError()) return; oldPid = getPid(); if (!StringUtils.ok(oldPid)) setError(Strings.get("restart.instance.nopid", instanceName)); }