public void start() { synchronized (lock) { if (state != State.DOWN) { log.debugf("Attempted to start already-running process '%s'", processName); return; } resetRespawnCount(); doStart(false); } }
public void handleFinished(final Connection connection) throws IOException { SERVER_LOGGER.tracef("Connection finished"); processController.removeManagedConnection(connection); // nothing }
public void handleFailure(final Connection connection, final IOException e) throws IOException { SERVER_LOGGER.tracef(e, "Received failure of connection"); processController.removeManagedConnection(connection); connection.close(); }
public void handleShutdown(final Connection connection) throws IOException { SERVER_LOGGER.tracef("Received end-of-stream for connection"); processController.removeManagedConnection(connection); connection.shutdownWrites(); }
@Override public void respawn(final int count, final ManagedProcess process, boolean slowRespawn, boolean unlimited) { ProcessLogger.SERVER_LOGGER.tracef("not trying to respawn process %s.", process.getProcessName()); }
public void stopProcess(final String processName) { synchronized (lock) { final Map<String, ManagedProcess> processes = this.processes; final ManagedProcess process = processes.get(processName); if (process == null) { ROOT_LOGGER.attemptToStopNonExistentProcess(processName); // ignore return; } process.stop(); } }
public void sendReconnectProcess(String processName, String hostName, int port, boolean managementSubsystemEndpoint, byte[] asAuthKey) { synchronized (lock) { ManagedProcess process = processes.get(processName); if (process == null) { ROOT_LOGGER.attemptToReconnectNonExistentProcess(processName); // ignore return; } process.reconnect(hostName, port, managementSubsystemEndpoint, asAuthKey); } }
@Override public void run() { processController.removeProcess(processName); } }.start();
public void run() { processController.shutdown(); } }, "Shutdown thread");
@Override public void close() throws IOException { flush(); } };
public void handleFinished(final Connection connection) throws IOException { SERVER_LOGGER.tracef("Connection finished"); processController.removeManagedConnection(connection); connection.close(); } }
public void handleShutdown(final Connection connection) throws IOException { SERVER_LOGGER.tracef("Received end-of-stream for connection"); processController.removeManagedConnection(connection); connection.shutdownWrites(); }
@Override public void run() { processController.removeProcess(processName); } }.start();
@Override public void close() throws IOException { flush(); } };
public void handleFailure(final Connection connection, final IOException e) throws IOException { SERVER_LOGGER.tracef(e, "Received failure of connection"); processController.removeManagedConnection(connection); connection.close(); }
@Override public void run() { processController.removeProcess(processName); } }.start();