Class Environment

org.elasticsearch.env.Environment

public class Environment extends
The environment of where things exists.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static >
     
    static <>>
     
    static >
     
    static >
     
    static <>>
     
    static >
     
    static >
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Environment​(Settings settings,  configPath)
     
    Environment​(Settings settings,  configPath, boolean nodeLocalStorage)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    asserts that the two environments are equivalent for all things the environment cares about (i.e., all but the setting object which may contain different setting)
     
    The config directory.
    []
    The data location.
    static boolean
    Returns true if the data path is a list, false otherwise
    static
     path)
     
    static long
     path)
     
     
     
     
    The PID file location (can be null if no PID file is configured)
     
    []
    The shared filesystem repo locations.
     location)
    Resolves the specified location against the list of configured repository roots If the specified location doesn't match any of the roots, returns null.
     url)
    Checks if the specified URL is pointing to the local file system and if it does, resolves the specified url against the list of configured repository roots If the specified url doesn't match any of the roots, returns null.
    The settings used to build this environment.
    The shared data location
    Path to the default temp directory used by the JDK
    void
    Ensure the configured temp directory is a valid directory

    Methods inherited from class java.lang.

    , , , , , , , , , ,
  • Field Details

    • PATH_HOME_SETTING

      public static final > PATH_HOME_SETTING
    • PATH_DATA_SETTING

      public static final <>> PATH_DATA_SETTING
    • PATH_LOGS_SETTING

      public static final > PATH_LOGS_SETTING
    • PATH_REPO_SETTING

      public static final <>> PATH_REPO_SETTING
    • PATH_SHARED_DATA_SETTING

      public static final > PATH_SHARED_DATA_SETTING
    • PIDFILE_SETTING

      public static final > PIDFILE_SETTING
    • NODE_PIDFILE_SETTING

      public static final > NODE_PIDFILE_SETTING
  • Constructor Details

    • Environment

      public Environment(Settings settings,  configPath)
    • Environment

      public Environment(Settings settings,  configPath, boolean nodeLocalStorage)
  • Method Details

    • settings

      public Settings settings()
      The settings used to build this environment.
    • dataFiles

      public [] dataFiles()
      The data location.
    • sharedDataFile

      public  sharedDataFile()
      The shared data location
    • repoFiles

      public [] repoFiles()
      The shared filesystem repo locations.
    • resolveRepoFile

      public  resolveRepoFile( location)
      Resolves the specified location against the list of configured repository roots If the specified location doesn't match any of the roots, returns null.
    • resolveRepoURL

      public  resolveRepoURL( url)
      Checks if the specified URL is pointing to the local file system and if it does, resolves the specified url against the list of configured repository roots If the specified url doesn't match any of the roots, returns null.
    • configFile

      public  configFile()
      The config directory.
    • pluginsFile

      public  pluginsFile()
    • binFile

      public  binFile()
    • libFile

      public  libFile()
    • modulesFile

      public  modulesFile()
    • logsFile

      public  logsFile()
    • pidFile

      public  pidFile()
      The PID file location (can be null if no PID file is configured)
    • tmpFile

      public  tmpFile()
      Path to the default temp directory used by the JDK
    • validateTmpFile

      public void validateTmpFile() throws
      Ensure the configured temp directory is a valid directory
      Throws:
    • dataPathUsesList

      public static boolean dataPathUsesList(Settings settings)
      Returns true if the data path is a list, false otherwise
    • getFileStore

      public static  getFileStore( path) throws
      Throws:
    • getUsableSpace

      public static long getUsableSpace( path) throws
      Throws:
    • assertEquivalent

      public static void assertEquivalent(Environment actual, Environment expected)
      asserts that the two environments are equivalent for all things the environment cares about (i.e., all but the setting object which may contain different setting)