public static void setLocatorStopping(File directory, int port, InetAddress bindAddress) { ManagerInfo.saveManagerInfo(OSProcess.getId(), STOPPING_STATUS_CODE, directory, port, bindAddress); } /**
private static long calcNumericId(StatisticsManager system, long userValue) { if (userValue != 0) { return userValue; } else { long result = OSProcess.getId(); // fix for bug 30239 if (result == 0) { if (system != null) { result = system.getId(); } } return result; } }
private static long calcNumericId(StatisticsManager system, long userValue) { if (userValue != 0) { return userValue; } else { long result = OSProcess.getId(); // fix for bug 30239 if (result == 0) { if (system != null) { result = system.getId(); } } return result; } }
public static void setLocatorStarted(File directory, int port, InetAddress bindAddress) { ManagerInfo.saveManagerInfo(OSProcess.getId(), STARTED_STATUS_CODE, directory, port, bindAddress); } public static File setLocatorStarting(File directory, LogWriterI18n log, int port, InetAddress bindAddress) {
public static void setLocatorStopping(File directory, int port, InetAddress bindAddress) { ManagerInfo.saveManagerInfo(OSProcess.getId(), STOPPING_STATUS_CODE, directory, port, bindAddress); } /**
public static void setLocatorStarted(File directory, int port, InetAddress bindAddress) { ManagerInfo.saveManagerInfo(OSProcess.getId(), STARTED_STATUS_CODE, directory, port, bindAddress); } public static File setLocatorStarting(File directory, int port, InetAddress bindAddress) {
private static long calcNumericId(StatisticsManager system, long userValue) { if (userValue != 0) { return userValue; } else { long result = OSProcess.getId(); // fix for bug 30239 if (result == 0) { if (system != null) { result = system.getId(); } } return result; } }
private static long calcNumericId(StatisticsManager system, long userValue) { if (userValue != 0) { return userValue; } else { long result = OSProcess.getId(); // fix for bug 30239 if (result == 0) { if (system != null) { result = system.getId(); } } return result; } }
private SequenceLoggerImpl() { String enabledTypesString = System.getProperty(ENABLED_TYPES_PROPERTY, ""); this.enabledTypes = GraphType.parse(enabledTypesString); if(!enabledTypes.isEmpty()) { try { String name = "states" + OSProcess.getId() + ".graph"; appender = new OutputStreamAppender(new File(name)); } catch (FileNotFoundException e) { } } }
private SequenceLoggerImpl() { String enabledTypesString = System.getProperty(ENABLED_TYPES_PROPERTY, ""); this.enabledTypes = GraphType.parse(enabledTypesString); if(!enabledTypes.isEmpty()) { try { String name = "states" + OSProcess.getId() + ".graph"; appender = new OutputStreamAppender(new File(name)); } catch (FileNotFoundException e) { } } }
/** * Sets the status of the cache server to be {@link #RUNNING}. */ public void running() { try { writeStatus(createStatus(this.baseName, RUNNING, OSProcess.getId())); } catch (Exception e) { e.printStackTrace(); } }
@Override protected final long getSpecialStatsId() { long statId = OSProcess.getId(); if (statId == 0 || statId == -1) { statId = getStatisticsManager().getId(); } return statId; }
@Override protected final long getSpecialStatsId() { long statId = OSProcess.getId(); if (statId == 0 || statId == -1) { statId = getStatisticsManager().getId(); } return statId; }
/** * Notes that an error has occurred in the agent and that it has shut down because of it. */ private void setServerError(final String message, final Throwable cause) { try { writeStatus(createStatus(this.basename, SHUTDOWN_PENDING_AFTER_FAILED_STARTUP, OSProcess.getId(), message, cause)); } catch (Exception e) { logger.fatal(e.getMessage(), e); System.exit(1); } }
/** Get or create static dlock stats */ protected static synchronized DistributedLockStats getOrCreateStats() { if (stats == DUMMY_STATS) { InternalDistributedSystem ds = InternalDistributedSystem.getAnyInstance(); Assert.assertTrue(ds != null, "Cannot find any instance of InternalDistributedSystem"); StatisticsFactory statFactory = ds; long statId = OSProcess.getId(); stats = new DLockStats(statFactory, statId); } return stats; }
/** Get or create static dlock stats */ protected static synchronized DistributedLockStats getOrCreateStats() { if (stats == DUMMY_STATS) { InternalDistributedSystem ds = InternalDistributedSystem.getAnyInstance(); Assert.assertTrue(ds != null, "Cannot find any instance of InternalDistributedSystem"); StatisticsFactory statFactory = ds; long statId = OSProcess.getId(); stats = new DLockStats(statFactory, statId); } return stats; }
/** * Starts the GemFire JMX Agent "server" process with the given command line arguments. */ public void server(final String[] args) throws Exception { final Map<String, Object> options = getStartOptions(args); workingDirectory = IOUtils.tryGetCanonicalFileElseGetAbsoluteFile((File) options.get(DIR)); writeStatus(createStatus(this.basename, STARTING, OSProcess.getId())); final Agent agent = createAgent((Properties) options.get(AGENT_PROPS)); final Thread thread = createAgentProcessThread(createAgentProcessThreadGroup(), agent); thread.setDaemon(true); thread.start(); // periodically check and see if the JMX Agent has been told to stop pollAgentForPendingShutdown(agent); }
public static File setLocatorStarting(File directory, LogWriterI18n log, int port, InetAddress bindAddress) { if (ManagerInfo.isManagerRunning(directory, true)) { throw new SystemIsRunningException(LocalizedStrings.ManagerInfo_0_1_IS_ALREADY_RUNNING.toLocalizedString(new Object[] {"Locator", directory.getPath()})); } File result = getManagerInfoFile(directory, true); ManagerInfo.saveManagerInfo(OSProcess.getId(), STARTING_STATUS_CODE, directory, port, bindAddress); return result; } // fix for bug #44059. store the port and address for the locator in the persistent information
public static File setLocatorStarting(File directory, int port, InetAddress bindAddress) { if (ManagerInfo.isManagerRunning(directory, true)) { throw new SystemIsRunningException(LocalizedStrings.ManagerInfo_0_1_IS_ALREADY_RUNNING.toLocalizedString(new Object[] {"Locator", directory.getPath()})); } File result = getManagerInfoFile(directory, true); ManagerInfo.saveManagerInfo(OSProcess.getId(), STARTING_STATUS_CODE, directory, port, bindAddress); return result; } // fix for bug #44059. store the port and address for the locator in the persistent information