Package org.elasticsearch.env
Class Environment
org.elasticsearch.env.Environment
public class Environment
extends
The environment of where things exists.
-
Field Summary
Modifier and TypeFieldDescriptionstatic >
static <>>
static >
static >
static <>>
static >
static >
-
Constructor Summary
ConstructorDescriptionEnvironment(Settings settings, configPath)
Environment(Settings settings, configPath, boolean nodeLocalStorage)
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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)binFile()
The config directory.[]
The data location.static boolean
dataPathUsesList(Settings settings)
Returns true if the data path is a list, false otherwisestatic
path)
static long
path)
libFile()
logsFile()
pidFile()
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.settings()
The settings used to build this environment.The shared data locationtmpFile()
Path to the default temp directory used by the JDKvoid
Ensure the configured temp directory is a valid directoryMethods 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
-
Environment
-
-
Method Details
-
settings
The settings used to build this environment. -
dataFiles
public [] dataFiles()The 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() throwsEnsure the configured temp directory is a valid directory- Throws:
-
dataPathUsesList
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
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)
-