|
||||||||||
| 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". dex.io.recovery - Enable ("true") or ("disable") recovery.
If disabled, all other recovery variables are ignored.
Value format: string. Default value: "false"dex.io.recovery.logfile - Recovery log file.
Empty string means the recovery log file will be the same
as the database path plus ".log".
Example: if the database is at "gdb.dex" then the recovery log
file will be "gdb.dex.log". Value format: string. Default value: ""dex.io.recovery.cachesize - Maximum size for the recovery
cache in MBs. Value format: number. Default value: 1dex.io.recovery.checkpointTime - Checkpoint frequency
for the recovery cache. Value format: time unit.
Default value: 60dex.ha - Enables or disables HA mode. If disabled,
all other HA variables are ignored. Value format: string.
Default value: falsedex.ha.ip - IP address and port for the instance. It must
be given as follows: `ip:port` Value format: string. Default value:
`localhost:7777`dex.ha.coordinators - Comma-separated list of the ZooKeeper
instances. For each instance, the IP address and the port must be given
as follows: `ip:port`. Moreover, the port must correspond to the
given as `clientPort` in the ZooKeeper configuration file. Value format:
string. Default value: "" dex.ha.sync - Synchronization polling time. If 0,
polling is disabled and synchronization is only performed when the slave
receives a write request, otherwise the parameter fixes the frequency the
slaves poll the master asking for writes. The polling timer is reset if
the slaves receives a write request, as it synchronizes then. Value
format: time unit. Default value: 0.dex.ha.master.history - The history log is limited to a
certain period of time, so writes occurred beyond that period of time
will be removed from it and the master will not accept requests from
those deleted DEX slaves. For example, in case of `12H`, the master
will store in the history log all write operations during the last 12
hours. It will reject requests from a slave which has not been up-to-date
in the last 12 hours. Value format: time unit. Default value: 1DApplication 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 | |||||||||