public class Configuration extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Configuration.PropertyName
All properties defined in framework.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Configuration() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
collectStatistics() |
boolean |
collectStatisticsOnHold() |
static ActiveJDBCLogger |
getActiveLogger() |
String |
getCacheManager() |
ConnectionSpec |
getConnectionSpec(String environment) |
ConnectionSpec |
getCurrentConnectionSpec()
Finds a connection
ConnectionSpec that corresponds to system properties,
environment variables of database.properties configuration, whichever is found first. |
static String |
getEnv()
Returns name of environment, such as "development", "production", etc.
|
String |
getEnvironment() |
static boolean |
hasActiveLogger() |
static void |
setEnv(String env)
This method must ony be used in tests.
|
public ConnectionSpec getConnectionSpec(String environment)
public ConnectionSpec getCurrentConnectionSpec()
ConnectionSpec that corresponds to system properties,
environment variables of database.properties configuration, whichever is found first.
Configuration of system properties overrides environment variables, which overrides
database.properties.ConnectionSpec used by DB.open() to open a "default" connection, as well as Base.open() methods.public String getEnvironment()
ACTIVE_ENV
of active_env system property. System property value overrides environment variable.
Defaults to "development" if no environment variable provided.public boolean collectStatistics()
public boolean collectStatisticsOnHold()
public String getCacheManager()
public static String getEnv()
ACTIVE_ENV.public static void setEnv(String env)
env - name of environment (development, staging, production, etc.).public static boolean hasActiveLogger()
public static ActiveJDBCLogger getActiveLogger()
Copyright © 2020 JavaLite. All rights reserved.