private static String getPortAsString(LocatorLauncher launcher) { if (InternalLocator.hasLocator()) { final InternalLocator locator = InternalLocator.getLocator(); final String portAsString = String.valueOf(locator.getPort()); if (isNotBlank(portAsString)) { return portAsString; } } return launcher.getPortAsString(); }
public LocatorState(final LocatorLauncher launcher, final Status status) { // if status is NOT_RESPONDING then this is executing inside the JVM asking for the status; // pid etc will be set according to the caller's JVM instead this(status, launcher.statusMessage, System.currentTimeMillis(), launcher.getId(), identifyPid(), ManagementFactory.getRuntimeMXBean().getUptime(), launcher.getWorkingDirectory(), ManagementFactory.getRuntimeMXBean().getInputArguments(), System.getProperty("java.class.path"), GemFireVersion.getGemFireVersion(), System.getProperty("java.version"), getLogFileCanonicalPath(launcher), launcher.getBindAddressAsString(), launcher.getPortAsString(), launcher.getMemberName()); }
public LocatorState(final LocatorLauncher launcher, final Status status, final String errorMessage) { this(status, // status errorMessage, // statusMessage System.currentTimeMillis(), // timestamp getLocatorLocation(launcher), // locatorLocation null, // pid 0L, // uptime launcher.getWorkingDirectory(), // workingDirectory ManagementFactory.getRuntimeMXBean().getInputArguments(), // jvmArguments null, // classpath GemFireVersion.getGemFireVersion(), // gemfireVersion System.getProperty("java.version"), // javaVersion null, // logFile launcher.getBindAddressAsString(), // host launcher.getPortAsString(), // port null);// memberName }
private LocatorState statusInProcess() { if (this.starting.get()) { debug( "Getting status from the LocatorLauncher instance that actually launched the GemFire Locator.%n"); return new LocatorState(this, Status.STARTING); } else { debug("Getting Locator status using host (%1$s) and port (%2$s)%n", getBindAddressAsString(), getPortAsString()); return statusWithPort(); } }
getPortAsString()); return statusWithPort(); getPortAsString()); return statusWithPort();