Package org.apache.geode.distributed
Class AbstractLauncher.ServiceState<T extends Comparable<T>>
java.lang.Object
org.apache.geode.distributed.AbstractLauncher.ServiceState<T>
- Direct Known Subclasses:
LocatorLauncher.LocatorState,ServerLauncher.ServerState
- Enclosing class:
- AbstractLauncher<T extends Comparable<T>>
The ServiceState is an immutable type representing the state of the specified Locator at any
given moment in time. The ServiceState associates the Locator with it's state at the exact
moment an instance of this class is constructed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedServiceState(AbstractLauncher.Status status, String statusMessage, long timestamp, String serviceLocation, Integer pid, Long uptime, String workingDirectory, List<String> jvmArguments, String classpath, String gemfireVersion, String javaVersion, String logFile, String host, String port, String memberName) -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringGets the Java classpath used when launching the GemFire service.Gets the version of GemFire used to launch and run the GemFire service.getHost()Gets the host or IP address for the process and its service.Gets the version of Java used to launch and run the GemFire service.Gets the arguments passed to the JVM process that is running the GemFire service.Gets the path of the log file for the process.Gets GemFire member's name for the process.getPid()Gets the process ID of the running GemFire service if known, otherwise returns null.getPort()Gets the port for the process and its service.Gets the location of the GemFire service (usually the host in combination with the port).protected abstract StringGets the name of the GemFire service.Gets the state of the GemFire service.Gets description of the the service's current state.The date and time the GemFire service was last in this state.Gets the amount of time in milliseconds that the JVM process with the GemFire service has been running.Gets the directory in which the GemFire service is running.protected static Integerstatic booleanisStartingNotRespondingOrNull(AbstractLauncher.ServiceState serviceState) booleanbooleanprotected static StringtoDaysHoursMinutesSeconds(Long milliseconds) toJson()Marshals this state object into a JSON String.toString()Gets a String describing the state of the GemFire service.protected Stringprotected Stringprotected Stringprotected String
-
Field Details
-
JSON_CLASSPATH
- See Also:
-
JSON_GEMFIREVERSION
- See Also:
-
JSON_HOST
- See Also:
-
JSON_JAVAVERSION
- See Also:
-
JSON_JVMARGUMENTS
- See Also:
-
JSON_LOCATION
- See Also:
-
JSON_LOGFILE
- See Also:
-
JSON_MEMBERNAME
- See Also:
-
JSON_PID
- See Also:
-
JSON_PORT
- See Also:
-
JSON_STATUS
- See Also:
-
JSON_STATUSMESSAGE
- See Also:
-
JSON_TIMESTAMP
- See Also:
-
JSON_UPTIME
- See Also:
-
JSON_WORKINGDIRECTORY
- See Also:
-
-
Constructor Details
-
ServiceState
protected ServiceState(AbstractLauncher.Status status, String statusMessage, long timestamp, String serviceLocation, Integer pid, Long uptime, String workingDirectory, List<String> jvmArguments, String classpath, String gemfireVersion, String javaVersion, String logFile, String host, String port, String memberName)
-
-
Method Details
-
format
-
identifyPid
-
toDaysHoursMinutesSeconds
-
toJson
Marshals this state object into a JSON String.- Returns:
- a String value containing the JSON representation of this state object.
-
isStartingNotRespondingOrNull
-
isStartingOrNotResponding
public boolean isStartingOrNotResponding() -
isVmWithProcessIdRunning
public boolean isVmWithProcessIdRunning() -
getClasspath
Gets the Java classpath used when launching the GemFire service.- Returns:
- a String value indicating the Java classpath used when launching the GemFire service.
- See Also:
-
getGemFireVersion
Gets the version of GemFire used to launch and run the GemFire service.- Returns:
- a String indicating the version of GemFire used in the running GemFire service.
-
getJavaVersion
Gets the version of Java used to launch and run the GemFire service.- Returns:
- a String indicating the version of the Java runtime used in the running GemFire service.
- See Also:
-
getJvmArguments
Gets the arguments passed to the JVM process that is running the GemFire service.- Returns:
- a List of String value each representing an argument passed to the JVM of the GemFire service.
- See Also:
-
getMemberName
Gets GemFire member's name for the process.- Returns:
- a String indicating the GemFire member's name for the process.
-
getPid
Gets the process ID of the running GemFire service if known, otherwise returns null.- Returns:
- a integer value indicating the process ID (PID) of the running GemFire service, or null if the PID cannot be determined.
-
getServiceLocation
Gets the location of the GemFire service (usually the host in combination with the port).- Returns:
- a String indication the location (such as host/port) of the GemFire service.
-
getServiceName
Gets the name of the GemFire service.- Returns:
- a String indicating the name of the GemFire service.
-
getStatus
Gets the state of the GemFire service.- Returns:
- a Status enumerated type representing the state of the GemFire service.
- See Also:
-
getStatusMessage
Gets description of the the service's current state.- Returns:
- a String describing the service's current state.
-
getTimestamp
The date and time the GemFire service was last in this state.- Returns:
- a Timestamp signifying the last date and time the GemFire service was in this state.
- See Also:
-
getUptime
Gets the amount of time in milliseconds that the JVM process with the GemFire service has been running.- Returns:
- a long value indicating the number of milliseconds that the GemFire service JVM has been running.
- See Also:
-
getWorkingDirectory
Gets the directory in which the GemFire service is running. This is also the location where all GemFire service files (log files, the PID file, and so on) are written.- Returns:
- a String value indicating the GemFire service's working (running) directory.
-
getLogFile
Gets the path of the log file for the process.- Returns:
- a String value indicating the path of the log file for the process.
-
getHost
Gets the host or IP address for the process and its service.- Returns:
- a String value representing the host or IP address for the process and its service.
-
getPort
Gets the port for the process and its service.- Returns:
- an Integer value indicating the port for the process and its service.
-
toString
Gets a String describing the state of the GemFire service. -
toString
-
toString
-
toString
-
toString
-