ozone API

org.ozoneDB
Class LocalDatabase

java.lang.Object
  extended byorg.ozoneDB.AbstractDatabase
      extended byorg.ozoneDB.ExternalDatabase
          extended byorg.ozoneDB.LocalDatabase
All Implemented Interfaces:
OzoneInterface

public final class LocalDatabase
extends ExternalDatabase

This class represents a local database server that runs inside the same JVM as the client. For a detailed method description see OzoneInterface.

Version:
$Revision: 1.8 $Date: 2002/09/18 06:54:13 $
Author:
SMB, SMB
See Also:
OzoneInterface

Field Summary
 org.ozoneDB.core.Env env
           
 java.lang.String userName
           
 
Fields inherited from class org.ozoneDB.ExternalDatabase
DefaultAccessRight, PROP_DEBUG, PROP_DIR, PROP_HOST, PROP_PASSWD, PROP_PORT, PROP_USER
 
Fields inherited from interface org.ozoneDB.OzoneInterface
AllLock, AllRead, GroupLock, GroupRead, Private, Public
 
Constructor Summary
LocalDatabase()
           
 
Method Summary
 void close()
          Close this database.
 java.lang.String create(java.lang.String dirName)
          Create a new database in the given directory using default values for all Setup entries.
 java.lang.String create(java.lang.String dirName, Setup setup)
          Create a new database in the given directory using the values of the given Setup.
 boolean exists(java.lang.String dbDir)
           
 boolean isOpen()
           
 void open(java.lang.String dirName)
          opens the database.
 void open(java.lang.String dirName, int debugLevel)
          Deprecated. but still needed by legacy software. use open(String _dirName, String _debugLevel ) instead.
 void open(java.lang.String dirName, java.lang.String debugLevel)
          Opens the database.
 void open(java.lang.String dirName, java.lang.String debugLevel, java.lang.String userName, java.lang.String password)
          Opens the database.
 java.lang.String toString()
           
 
Methods inherited from class org.ozoneDB.ExternalDatabase
admin, beginTX, checkpointTX, commitTX, copyObject, createObject, createObject, createObject, createObject, createObject, createObject, createObject, createObject, createObject, createObject, currentExternalTransaction, currentTransaction, deleteObject, fetch, forThread, getStatusTX, getXAResource, invoke, invoke, joinTX, leaveTX, nameObject, newTransaction, notifyProxyDeath, objectForHandle, objectForName, objectNames, openDatabase, openDatabase, prepareTX, reloadClasses, rollbackTX, xmlForObject, xmlForObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

env

public org.ozoneDB.core.Env env

userName

public java.lang.String userName
Constructor Detail

LocalDatabase

public LocalDatabase()
Method Detail

create

public java.lang.String create(java.lang.String dirName)
                        throws java.lang.Exception
Create a new database in the given directory using default values for all Setup entries.

Parameters:
dirName - The directory to create the database in
Returns:
a StringWriter that holds the status messages
Throws:
java.lang.Exception
See Also:
Setup

create

public java.lang.String create(java.lang.String dirName,
                               Setup setup)
                        throws java.lang.Exception
Create a new database in the given directory using the values of the given Setup.

Parameters:
dirName -
Returns:
a StringWriter that holds the status messages
Throws:
java.lang.Exception
See Also:
Setup

open

public void open(java.lang.String dirName)
          throws java.lang.Exception
opens the database.

Parameters:
dirName - is the path name of the database directory root
Throws:
java.lang.Exception

open

public void open(java.lang.String dirName,
                 int debugLevel)
          throws java.lang.Exception
Deprecated. but still needed by legacy software. use open(String _dirName, String _debugLevel ) instead.

For backwards compatibility

Parameters:
dirName - is the path name of the database directory root
debugLevel - should match one of the constants in OzoneDebugLevel. Overrrides the property ozoneDB.logLevel in config.properties.
Throws:
java.lang.Exception

open

public void open(java.lang.String dirName,
                 java.lang.String debugLevel)
          throws java.lang.Exception
Opens the database.

Parameters:
dirName - is the path name of the database directory root
debugLevel - derived from OzoneDebugLevel. Overrrides the property ozoneDB.logLevel in config.properties. If set to null, the config.properties setting will be used.
Throws:
java.lang.Exception

open

public void open(java.lang.String dirName,
                 java.lang.String debugLevel,
                 java.lang.String userName,
                 java.lang.String password)
          throws java.lang.Exception
Opens the database.

Parameters:
dirName -
debugLevel - one of the String constants in OzoneDebugLevel (e.g. INFO_STR). Overrrides the property ozoneDB.logLevel in config.properties. If set to null, the config.properties setting will be used.
userName -
password -
Throws:
java.lang.Exception

isOpen

public boolean isOpen()
               throws java.lang.Exception
Overrides:
isOpen in class ExternalDatabase
Throws:
java.lang.Exception

close

public void close()
           throws java.lang.Exception
Description copied from class: ExternalDatabase
Close this database.

Overrides:
close in class ExternalDatabase
Throws:
java.lang.Exception

toString

public java.lang.String toString()

exists

public boolean exists(java.lang.String dbDir)

ozone API

Copyright (C) The Ozone Database Project - www.ozone-db.org. All rights reserved.