| |
|
| java.lang.Object org.ozoneDB.core.Env
Env | final public class Env (Code) | | Env is the environment of a ozone database server. Currently there
is only one environment allowed per JVM. A server environment can be
initialized by the a Server or by a LocalDatabase.
author: SMB author: Medium.net version: $Revision: 1.5 $Date: 2002/06/25 11:34:38 $ |
Constructor Summary | |
public | Env(String _dirName, String _debugLevel) Construct a new ozone server environment.
Parameters: _dirName - Directory of the database. Parameters: _debugLevel - the debug level that should be used,oveerriding the entry in config.properties. |
ACCEPT_THREAD_PRIORITY | final public static int ACCEPT_THREAD_PRIORITY(Code) | | AdminPort and InvokeServer accepts and admin requests
|
DEADLOCK_THREAD_PRIORITY | final public static int DEADLOCK_THREAD_PRIORITY(Code) | | Thread priority deadlock recognition.
|
SERVER_THREAD_PRIORITY | final public static int SERVER_THREAD_PRIORITY(Code) | | Priority of the server thread (Server.main())
|
TRANSACTION_MUTEX_PRIORITY | final public static int TRANSACTION_MUTEX_PRIORITY(Code) | | |
TRANSACTION_THREAD_PRIORITY | final public static int TRANSACTION_THREAD_PRIORITY(Code) | | Thread priority of normal transaction.
|
config | public Setup config(Code) | | Holds the content of the 'config.properties' config file.
|
database | public Database database(Code) | | Interface for the database objects inside the server.
|
keepMemory | protected long keepMemory(Code) | | |
selfCheck | final public static boolean selfCheck(Code) | | Wether ozone should do selfChecks at different code locations.
If set to true, diagnostic messages are printed out
in case something unusual or bad has been detected.
If set to false, ozone will run at full speed.
This is a kind of "poor man"s assertion facility as long as
ozone should be compileable by javac older than from JDK1.4
|
shuttingdown | public boolean shuttingdown(Code) | | This indicates that we are about to shutdown.
|
state | public Setup state(Code) | | Holds the content of the 'state.properties' file. After
changing the content the state must be written to disk to make
changes persistent.
|
theEnv | public static Env theEnv(Code) | | The one and only ozone environment of this VM.
|
totalMemory | protected long totalMemory(Code) | | |
Env | public Env(String _dirName, String _debugLevel) throws Exception(Code) | | Construct a new ozone server environment.
Parameters: _dirName - Directory of the database. Parameters: _debugLevel - the debug level that should be used,oveerriding the entry in config.properties. If null then theconfig.properties entry will be used. |
adminPortNum | public int adminPortNum()(Code) | | |
calcMemory | protected void calcMemory()(Code) | | Initialize the internal memory counter so that freeMemory() returns
correct results.
|
currentEnv | public static Env currentEnv()(Code) | | Returns the environment of the current thread. Useful for objects that
do not store the enviroment itself like ObjectContainer.
The environment of the current thread or null if called outsidethe server. |
freeMemory | public long freeMemory()(Code) | | Return the amount of *total* free memory in the system. The results
returned by Runtime.freeMemory() may change overtime and so its
useless for ozone.
|
initLogs | protected void initLogs(String debugLevelName) throws Exception(Code) | | Initialize server logging. There are two LogTargets: stdout and file.
Which log messages are written to which target is specified in the
config file. If the server runs in debug mode, debug
messages are written to each target.
If debugLevelName is set to null the setting from the config.properties file is used
|
initSetup | protected void initSetup() throws Exception(Code) | | Initialize the setup (state and config) of this server environment. When
searching specific property look in setup file first, then in the
properties file, then use defaults, then use System properties.
|
isComponentStateChanged | public boolean isComponentStateChanged()(Code) | | |
portNum | public int portNum()(Code) | | |
shutdown | public void shutdown()(Code) | | |
startDeadlockRecognition | public void startDeadlockRecognition()(Code) | | |
startExternalEventProcessing | public void startExternalEventProcessing() throws Exception(Code) | | |
storeSetup | protected synchronized void storeSetup()(Code) | | Save the setup (state and config) of the current server environment.
|
|
|
|