public final class Config extends Object
This class serves as the configuration store for property based configuration. The property set used by this class to resolve configuration property requests is prepared as follows:
This class MAY be used by end users, however its usage is not supported unless one is directed to do so by Neeve Support.
Constructor and Description |
---|
Config() |
Modifier and Type | Method and Description |
---|---|
static String |
getBinDirectory()
Get the runtime bin directory
|
static String |
getConfigDirectory()
Get the runtime configuration directory.
|
static String |
getDataDirectory()
Get the runtime data directory and create if absent.
|
static String |
getDataDirectory(boolean createIfAbsent)
Get the runtime data directory.
|
static String |
getJavaLibDirectory()
Get the java libs directory
|
static String |
getLogsDirectory()
Get the runtime trace log directory and create if absent.
|
static String |
getLogsDirectory(boolean createIfAbsent)
Get the runtime trace log directory.
|
static Properties |
getProps()
Returns the configuration store's property set.
|
static Properties |
getPropsNoWarn()
Returns the configuration store's property set.
|
static String |
getRootDirectory()
Get the runtime root directory.
|
static String |
getUnmanagedJavaLibDirectory()
Get the java unmanaged lib directory
|
static void |
initialize(Properties props)
Initializes the configuration store.
|
static void |
reset()
Resets the configuration store to its pre-initialized state.
|
public static final void reset()
This method can be used to reset the configuration store to its original state. It is not intended for use in production environments and serves primarily as a mechanism for clearing out the configuration store in unit testing scenarios.
This method IS NOT recommend to be used by end users and may be removed or altered without notice
public static final void initialize(Properties props)
props
- The property set to initialize with.public static final Properties getPropsNoWarn()
public static final Properties getProps()
The caller should not modify the returned set of properties. All mutative operations on the environment should be done via calls to this class instead.
public static final String getRootDirectory()
This method returns the runtime root directory. The runtime root directory is stored in the NVROOT system property. In case the property is not set, the current directory ('.') is returned as the runtime root.
public static final String getBinDirectory()
public static final String getConfigDirectory()
public static final String getJavaLibDirectory()
public static final String getUnmanagedJavaLibDirectory()
public static final String getDataDirectory(boolean createIfAbsent)
createIfAbsent
- Causes the directory to be created if absent,public static final String getDataDirectory()
This method is equivalent to the invoking getDataDirectory(true)
public static final String getLogsDirectory(boolean createIfAbsent)
createIfAbsent
- Causes the directory to be created if absent.public static final String getLogsDirectory()
This method is equivalent to the invoking getLogsDirectory(true)
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.