|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Dictionary<K,V> java.util.Hashtable<Object,Object> java.util.Properties net.sf.farrago.util.FarragoProperties
public class FarragoProperties
Provides the properties which control limited aspects of Farrago behavior. In most cases, Farrago behavior should be controlled by defining configuration parameters in the catalog, NOT by defining properties here. Java properties should only be used for controlling bootstrap behavior (before the catalog becomes available) or internals which don't belong as parameters (e.g. tweaks for controlling test behavior). As a gentle hint to keep properties to a minimum, we intentionally make it difficult to set them. How? By not defining a master Farrago .properties file. Instead, runtime and build scripts set just the properties they need on the command line.
Field Summary | |
---|---|
StringProperty |
catalogDir
The optional string property "net.sf.farrago.catalog" is the path to the Farrago repository directory. |
StringProperty |
defaultSessionFactoryLibraryName
The optional string property "net.sf.farrago.defaultSessionFactoryLibraryName" is the name of the plugin library to use for the default session factory. |
StringProperty |
homeDir
The string property "net.sf.farrago.home" is the path to the Farrago installation directory. |
private static FarragoProperties |
instance
|
private static String |
PROPERTY_EXPANSION_PATTERN
|
StringProperty |
testFilesetConcurrent
The string property "net.sf.farrago.fileset.concurrentsql" specifies a newline-separated list of concurrency test SQL script files to run. |
StringProperty |
testFilesetRegression
The string property "net.sf.farrago.fileset.regressionsql" specifies a newline-separated list of regression test SQL script files to run. |
StringProperty |
testFilesetUnitlurql
The string property "org.eigenbase.fileset.unitlurql" specifies a newline-separated list of LURQL test script files to run. |
StringProperty |
testFilesetUnitsql
The string property "net.sf.farrago.fileset.unitsql" specifies a newline-separated list of unit test SQL script files to run. |
StringProperty |
testJdbcDriverClass
The string property "net.sf.farrago.test.jdbcDriverClass" specifies the fully qualified name of the JDBC driver to use during testing. |
BooleanProperty |
testTableReloadCrash
The boolean property "net.sf.farrago.ddl.DdlReloadTableStmt.crash" causes ALTER TABLE to fail in a mode which simultates a database crash. |
IntegerProperty |
testTableReloadSleep
The integer property "net.sf.farrago.ddl.DdlReloadTableStmt.sleep" specifies (if set) the number of milliseconds that ALTER TABLE should sleep after taking locks and before executing. |
StringProperty |
traceConfigFile
The string property "java.util.logging.config.file" is the path to the Farrago trace configuration file. |
Fields inherited from class java.util.Properties |
---|
defaults |
Constructor Summary | |
---|---|
private |
FarragoProperties()
|
Method Summary | |
---|---|
String |
expandProperties(String value)
Expands properties embedded in the given String. |
File |
getCatalogDir()
|
static FarragoProperties |
instance()
|
static FarragoProperties |
newInstance()
WARNING: in most cases you should be using the singleton instance instead. |
Methods inherited from class java.util.Properties |
---|
getProperty, getProperty, list, list, load, loadFromXML, propertyNames, save, setProperty, store, storeToXML, storeToXML |
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 |
Field Detail |
---|
private static FarragoProperties instance
private static final String PROPERTY_EXPANSION_PATTERN
public final StringProperty traceConfigFile
public final StringProperty homeDir
public final StringProperty catalogDir
getCatalogDir()
public final StringProperty defaultSessionFactoryLibraryName
FarragoDefaultSessionFactory
.
public final StringProperty testJdbcDriverClass
FarragoJdbcEngineDriver
is
used.
public final StringProperty testFilesetUnitsql
public final StringProperty testFilesetRegression
public final StringProperty testFilesetConcurrent
public final StringProperty testFilesetUnitlurql
public final IntegerProperty testTableReloadSleep
public final BooleanProperty testTableReloadCrash
Constructor Detail |
---|
private FarragoProperties()
Method Detail |
---|
public static FarragoProperties instance()
singleton
properties object, constructed from System.getProperties()
.public static FarragoProperties newInstance()
instance
instead.
public File getCatalogDir()
catalogDir
if set, otherwise the "catalog" subdirectory of
homeDir
public String expandProperties(String value)
${propertyName}
. Property names must
match the Pattern
\w character class ([a-zA-z_0-9]
);
groups of characters may be separated by periods (such as
net.sf.farrago.home
).
References to unknown or undefined properties are not modified (e.g.,
the expansion of "${UNKNOWN}"
is "${UNKNOWN}"
).
Currently, two special properties are supported:
${FARRAGO_HOME}
: replaced with the value of homeDir
.
${FARRAGO_CATALOG_DIR}
: replaced with the value of
getCatalogDir()
.
All other tokens are used as keys to property values in this object.
value
- a value that may or may not contain property names to be
expanded.
value
parameter with its property references
expanded -- returns value
if no known property references
are found
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |