/** * Cleans up any artifacts left by a killed locator. Namely the info file is deleted. */ private static void cleanupAfterKilledLocator(File directory) { try { if (ManagerInfo.getLocatorStatusCode(directory) == ManagerInfo.KILLED_STATUS_CODE) { File infoFile = ManagerInfo.getLocatorInfoFile(directory); if (infoFile.exists()) { if (!infoFile.delete() && infoFile.exists()) { System.out.println("WARNING: unable to delete " + infoFile.getAbsolutePath()); } if (!quiet) { System.out.println( "Cleaned up artifacts left by the previous killed locator."); } } } } catch (GemFireException ignore) { } }