public static ManagerInfo loadLocatorInfo(File directory) { return loadManagerInfo(directory, true); }
private static int getManagerStatusCode(File directory, boolean locator) { boolean interrupted = false; try { ManagerInfo mi = ManagerInfo.loadManagerInfo(directory, locator); if (!PureJavaMode.isPure() && !OSProcess.exists(mi.getManagerProcessId())) { return KILLED_STATUS_CODE; ManagerInfo.loadManagerInfo(directory, locator);
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; } } }
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; } } }
private static boolean isManagerRunning(File directory, boolean locator) { try { ManagerInfo mi = loadManagerInfo(directory, locator); int status = mi.getManagerStatus(); if (status != STARTED_STATUS_CODE && status != STARTING_STATUS_CODE