protected boolean isExistingProcess(final int pid) { return (PureJavaMode.isPure() || (pid != 0 && OSProcess.exists(pid))); }
/** * A wrapper method for the readStatus method to make one last check for the GemFire JMX Agent process if running * with the native libraries. * @return the Status object as returned from readStatus unless running in native mode and a determination is made * such that the Agent process is not running. * @throws IOException if the state of the Agent process could not be read from the .agent.ser status file. * @see #readStatus() */ protected Status nativeReadStatus() throws IOException { Status status = readStatus(); // @see Bug #32760 - the bug is still possible in pure Java mode if (status != null && !PureJavaMode.isPure() && !OSProcess.exists(status.pid)) { status = createStatus(status, SHUTDOWN); } return status; }
private static boolean isManagerStopped(File directory, boolean locator) { try { ManagerInfo mi = loadManagerInfo(directory, locator); if (!OSProcess.exists(mi.getManagerProcessId())) { return true; } return false; } catch (UnstartedSystemException ignore) { return true; } catch (GemFireIOException ex) { Throwable cause = ex.getCause(); if (cause == null) { // this happens when the file was zero size return false; } else if (cause instanceof InvalidClassException) { // This happens when we have a serialVersionUID mismatch. // We don't want to hide this so throw the exception throw ex; } else { return false; } } }
if( PureJavaMode.isPure() || OSProcess.exists(pid) ) { System.out.println("Unable to connect to Locator process. Possible causes are that an incorrect bind address/port combination was specified to the stop-locator command or the process is unresponsive."); int sleepCount = 0; final int maxSleepCount = 15; while (++sleepCount < maxSleepCount && OSProcess.exists(pid) ) { Thread.sleep(1000); if (sleepCount == maxSleepCount/3 && !quiet) { } else if( OSProcess.exists(pid) ) { System.out.println("Locator process did not terminate within " + maxSleepCount + " seconds.");
if( PureJavaMode.isPure() || OSProcess.exists(pid) ) { System.out.println("Unable to connect to Locator process. Possible causes are that an incorrect bind address/port combination was specified to the stop-locator command or the process is unresponsive."); int sleepCount = 0; final int maxSleepCount = 15; while (++sleepCount < maxSleepCount && OSProcess.exists(pid) ) { Thread.sleep(1000); if (sleepCount == maxSleepCount/3 && !quiet) { } else if( OSProcess.exists(pid) ) { System.out.println("Locator process did not terminate within " + maxSleepCount + " seconds.");
private static boolean isManagerStopped(File directory, boolean locator) { try { ManagerInfo mi = loadManagerInfo(directory, locator); if (!OSProcess.exists(mi.getManagerProcessId())) { return true; } return false; } catch (UnstartedSystemException ignore) { return true; } catch (GemFireIOException ex) { Throwable cause = ex.getCause(); if (cause == null) { // this happens when the file was zero size return false; } else if (cause instanceof InvalidClassException) { // This happens when we have a serialVersionUID mismatch. // We don't want to hide this so throw the exception throw ex; } else { return false; } } }
!(treatAsPure || OSProcess.exists(managerPid)))
!(treatAsPure || OSProcess.exists(managerPid)))
try { ManagerInfo mi = ManagerInfo.loadManagerInfo(directory, locator); if (!PureJavaMode.isPure() && !OSProcess.exists(mi.getManagerProcessId())) { return KILLED_STATUS_CODE; } else {
try { ManagerInfo mi = ManagerInfo.loadManagerInfo(directory, locator); if (!PureJavaMode.isPure() && !OSProcess.exists(mi.getManagerProcessId())) { return KILLED_STATUS_CODE; } else {
if (!PureJavaMode.isPure() && !OSProcess.exists(mi.getManagerProcessId())) { return false;
private static boolean isManagerStarted(File directory, boolean locator) { try { ManagerInfo mi = loadManagerInfo(directory, locator); int status = mi.getManagerStatus(); if (status != STARTED_STATUS_CODE) { return false; } // Check to see if manager process exists, assume it is for PureJava if (PureJavaMode.isPure() || OSProcess.exists(mi.getManagerProcessId())) { return true; } return false; } catch (UnstartedSystemException ignore) { return false; } catch (GemFireIOException ex) { Throwable cause = ex.getCause(); if (cause == null) { // this happens when the file was zero size return false; } else if (cause instanceof InvalidClassException) { // This happens when we have a serialVersionUID mismatch. // We don't want to hide this so throw the exception throw ex; } else { return false; } } } public static boolean isLocatorRunning(File directory) {
private static boolean isManagerStarted(File directory, boolean locator) { try { ManagerInfo mi = loadManagerInfo(directory, locator); int status = mi.getManagerStatus(); if (status != STARTED_STATUS_CODE) { return false; } // Check to see if manager process exists, assume it is for PureJava if (PureJavaMode.isPure() || OSProcess.exists(mi.getManagerProcessId())) { return true; } return false; } catch (UnstartedSystemException ignore) { return false; } catch (GemFireIOException ex) { Throwable cause = ex.getCause(); if (cause == null) { // this happens when the file was zero size return false; } else if (cause instanceof InvalidClassException) { // This happens when we have a serialVersionUID mismatch. // We don't want to hide this so throw the exception throw ex; } else { return false; } } } public static boolean isLocatorRunning(File directory) {
if (!PureJavaMode.isPure() && !OSProcess.exists(mi.getManagerProcessId())) { return false;