|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Dictionary
java.util.Hashtable
java.util.Properties
edu.upc.dama.dex.utils.DEXConfig
public class DEXConfig
Runtime configuration settings for the DEX framework.
Maintains a set of hardwired configuration settings that can be overrriden
by creating a text properties file containing custom values. By default,
DEX will look for the file "dex.cfg" in the current working
directory for configuration name/value pairs. The framework can be
instructed to look for a different file by putting the full path to
the file into the "dex.config" System property (for example
by using a -D flag at the Java runtime command line).
Some of the supported configuration properties include:
dex.io.cache.maxsize - Maximum Cache (total pools) size
in MB. 0 means unlimited. The default setting
is 0.dex.monitor.active - Activate the remote monitor. It is
necessary to use DEXAdmin. The default setting is false.dex.monitor.port - Port used by the monitor for the remote
connections. The default setting is 9999.dex.tasks.workers - Number of workers to be used by
the task Scheduler (Scheduler). The
default setting is 1.dex.license - License code. The default setting
is "", which means evaluation version.dex.log - Log traces. It is possible to specify a
log level and an output file. Allowed log levels, from lower to higher, are:
OFF, SEVERE, WARNING,
INFO, CONFIG and FINE.
The higher the level the more log traces we get. Specifically,
OFF disables all log traces. For the output file a
relative or full path ca be given. The default setting
is "INFO;jdex.log". Application creators are welcome to add their own custom properties to the configuration files and use the DEXConfig instance to access those properties.
This class is a singleton, accessed through a static accessor method.
| Field Summary |
|---|
| Fields inherited from class java.util.Properties |
|---|
defaults |
| Method Summary | |
|---|---|
static java.lang.String |
get(java.lang.String key)
Gets a DEX configuration property. |
static boolean |
getBoolean(java.lang.String key)
Gets a DEX configuration property as a boolean. |
static DEXConfig |
getConfig()
Gets the global DEXConfig instance. |
static double |
getDouble(java.lang.String key)
Gets a DEX configuration property as a double. |
static float |
getFloat(java.lang.String key)
Gets a DEX configuration property as a float. |
static int |
getInt(java.lang.String key)
Gets a DEX configuration property as an integer. |
static long |
getLong(java.lang.String key)
Gets a DEX configuration property as a long. |
static void |
set(java.lang.String key,
java.lang.String value)
Sets a DEX configuration property. |
| Methods inherited from class java.util.Properties |
|---|
getProperty, getProperty, list, list, load, load, loadFromXML, propertyNames, save, setProperty, store, store, storeToXML, storeToXML, stringPropertyNames |
| Methods inherited from class java.util.Hashtable |
|---|
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static DEXConfig getConfig()
DEXConfig instance.
public static java.lang.String get(java.lang.String key)
key - the name of the property to lookup.
public static int getInt(java.lang.String key)
key - the name of the property to lookup.
public static long getLong(java.lang.String key)
key - the name of the property to lookup.
public static float getFloat(java.lang.String key)
key - the name of the property to lookup.
public static double getDouble(java.lang.String key)
key - the name of the property to lookup.
public static boolean getBoolean(java.lang.String key)
key - the name of the property to lookup.
public static void set(java.lang.String key,
java.lang.String value)
key - the name of the property.value - the value of the property.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||