java.lang.Object
java.lang.Record
org.elasticsearch.cli.ProcessInfo
- Record Components:
sysprops- System properties passed to the JVMenvVars- Environment variables of the processworkingDir- The working directory of the process
public record ProcessInfo(Map<String,String> sysprops, Map<String,String> envVars, Path workingDir)
extends Record
A holder for information about a CLI process.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionenvVars()Returns the value of theenvVarsrecord component.final booleanIndicates whether some other object is "equal to" this one.static ProcessInfoReturn process info for the current JVM.final inthashCode()Returns a hash code value for this object.sysprops()Returns the value of thesyspropsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theworkingDirrecord component.
-
Constructor Details
-
ProcessInfo
Creates an instance of aProcessInforecord class.- Parameters:
sysprops- the value for thesyspropsrecord componentenvVars- the value for theenvVarsrecord componentworkingDir- the value for theworkingDirrecord component
-
-
Method Details
-
fromSystem
Return process info for the current JVM. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
sysprops
Returns the value of thesyspropsrecord component.- Returns:
- the value of the
syspropsrecord component
-
envVars
Returns the value of theenvVarsrecord component.- Returns:
- the value of the
envVarsrecord component
-
workingDir
Returns the value of theworkingDirrecord component.- Returns:
- the value of the
workingDirrecord component
-