Record Class ServerArgs

java.lang.Object
java.lang.Record
org.elasticsearch.bootstrap.ServerArgs
Record Components:
daemonize - true if Elasticsearch should run as a daemon process, or false otherwise
quiet - false if Elasticsearch should print log output to the console, true otherwise
pidFile - absolute path to a file Elasticsearch should write its process id to, or null if no pid file should be written
secrets - the provided secure settings implementation
nodeSettings - the node settings read from elasticsearch.yml, the cli and the process environment
configDir - the directory where elasticsearch.yml and other config exists
logsDir - the directory where log files should be written
All Implemented Interfaces:
Writeable

public record ServerArgs(boolean daemonize, boolean quiet, Path pidFile, SecureSettings secrets, Settings nodeSettings, Path configDir, Path logsDir) extends Record implements Writeable
Arguments for running Elasticsearch.
  • Constructor Details

    • ServerArgs

      public ServerArgs(boolean daemonize, boolean quiet, Path pidFile, SecureSettings secrets, Settings nodeSettings, Path configDir, Path logsDir)
      Arguments for running Elasticsearch.
      Parameters:
      daemonize - true if Elasticsearch should run as a daemon process, or false otherwise
      quiet - false if Elasticsearch should print log output to the console, true otherwise
      pidFile - absolute path to a file Elasticsearch should write its process id to, or null if no pid file should be written
      secrets - the provided secure settings implementation
      nodeSettings - the node settings read from elasticsearch.yml, the cli and the process environment
      configDir - the directory where elasticsearch.yml and other config exists
    • ServerArgs

      public ServerArgs(StreamInput in) throws IOException
      Alternate constructor to read the args from a binary stream.
      Throws:
      IOException
  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • daemonize

      public boolean daemonize()
      Returns the value of the daemonize record component.
      Returns:
      the value of the daemonize record component
    • quiet

      public boolean quiet()
      Returns the value of the quiet record component.
      Returns:
      the value of the quiet record component
    • pidFile

      public Path pidFile()
      Returns the value of the pidFile record component.
      Returns:
      the value of the pidFile record component
    • secrets

      public SecureSettings secrets()
      Returns the value of the secrets record component.
      Returns:
      the value of the secrets record component
    • nodeSettings

      public Settings nodeSettings()
      Returns the value of the nodeSettings record component.
      Returns:
      the value of the nodeSettings record component
    • configDir

      public Path configDir()
      Returns the value of the configDir record component.
      Returns:
      the value of the configDir record component
    • logsDir

      public Path logsDir()
      Returns the value of the logsDir record component.
      Returns:
      the value of the logsDir record component