public class Environment
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Setting<java.lang.String> |
DEFAULT_PATH_CONF_SETTING |
static Setting<java.util.List<java.lang.String>> |
DEFAULT_PATH_DATA_SETTING |
static Setting<java.lang.String> |
DEFAULT_PATH_LOGS_SETTING |
static Setting<java.lang.String> |
PATH_CONF_SETTING |
static Setting<java.util.List<java.lang.String>> |
PATH_DATA_SETTING |
static Setting<java.lang.String> |
PATH_HOME_SETTING |
static Setting<java.lang.String> |
PATH_LOGS_SETTING |
static Setting<java.util.List<java.lang.String>> |
PATH_REPO_SETTING |
static Setting<java.lang.String> |
PATH_SCRIPTS_SETTING |
static Setting<java.lang.String> |
PATH_SHARED_DATA_SETTING |
static Setting<java.lang.String> |
PIDFILE_SETTING |
Constructor and Description |
---|
Environment(Settings settings) |
Environment(Settings settings,
java.lang.String configExtension) |
Modifier and Type | Method and Description |
---|---|
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)
|
java.nio.file.Path |
binFile() |
java.lang.String |
configExtension()
Return then extension of the config file that was loaded, or
|
java.nio.file.Path |
configFile()
The config directory.
|
java.nio.file.Path[] |
dataFiles()
The data location.
|
java.nio.file.Path[] |
dataWithClusterFiles()
Deprecated.
Used to upgrade old data paths to new ones that do not include the cluster name, should not be used to write files to and
will be removed in ES 6.0
|
static java.nio.file.FileStore |
getFileStore(java.nio.file.Path path)
Looks up the filestore associated with a Path.
|
java.nio.file.Path |
libFile() |
java.nio.file.Path |
logsFile() |
java.nio.file.Path |
modulesFile() |
java.nio.file.Path |
pidFile()
The PID file location (can be null if no PID file is configured)
|
java.nio.file.Path |
pluginsFile() |
java.nio.file.Path[] |
repoFiles()
The shared filesystem repo locations.
|
java.nio.file.Path |
resolveRepoFile(java.lang.String 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.
|
java.net.URL |
resolveRepoURL(java.net.URL 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.
|
java.nio.file.Path |
scriptsFile()
Location of on-disk scripts
|
Settings |
settings()
The settings used to build this environment.
|
java.nio.file.Path |
sharedDataFile()
The shared data location
|
java.nio.file.Path |
tmpFile()
Path to the default temp directory used by the JDK
|
public static final Setting<java.lang.String> PATH_HOME_SETTING
public static final Setting<java.lang.String> DEFAULT_PATH_CONF_SETTING
public static final Setting<java.lang.String> PATH_CONF_SETTING
public static final Setting<java.lang.String> PATH_SCRIPTS_SETTING
public static final Setting<java.util.List<java.lang.String>> DEFAULT_PATH_DATA_SETTING
public static final Setting<java.util.List<java.lang.String>> PATH_DATA_SETTING
public static final Setting<java.lang.String> DEFAULT_PATH_LOGS_SETTING
public static final Setting<java.lang.String> PATH_LOGS_SETTING
public static final Setting<java.util.List<java.lang.String>> PATH_REPO_SETTING
public static final Setting<java.lang.String> PATH_SHARED_DATA_SETTING
public static final Setting<java.lang.String> PIDFILE_SETTING
public Environment(Settings settings)
public Environment(Settings settings, java.lang.String configExtension)
public Settings settings()
public java.nio.file.Path[] dataFiles()
public java.nio.file.Path sharedDataFile()
@Deprecated public java.nio.file.Path[] dataWithClusterFiles()
public java.nio.file.Path[] repoFiles()
public java.nio.file.Path resolveRepoFile(java.lang.String location)
public java.net.URL resolveRepoURL(java.net.URL url)
public java.lang.String configExtension()
public java.nio.file.Path configFile()
public java.nio.file.Path scriptsFile()
public java.nio.file.Path pluginsFile()
public java.nio.file.Path binFile()
public java.nio.file.Path libFile()
public java.nio.file.Path modulesFile()
public java.nio.file.Path logsFile()
public java.nio.file.Path pidFile()
public java.nio.file.Path tmpFile()
public static java.nio.file.FileStore getFileStore(java.nio.file.Path path) throws java.io.IOException
This is an enhanced version of Files.getFileStore(Path)
:
ext4
) instead of rootfs
.
lucene:spins
is supported
via the FileStore.getAttribute(String)
method.
Files.getFileStore(Path)
,
no permissions to the actual mount point are required.
Files.getFileStore(Path)
.
java.io.IOException
public static void assertEquivalent(Environment actual, Environment expected)