org.hsqldb
Class DatabaseManager

java.lang.Object
  extended byorg.hsqldb.DatabaseManager

public class DatabaseManager
extends Object

Multifunction class with all static methods.

Handles initial attempts to connect to HSQLDB databases within the JVM (or a classloader within the JVM). Opens the database if it is not open or connects to it if it is already open. This allows the same database to be used by different instances of Server and by direct connections.

Maintains a map of Server instances and notifies each server when its database has shut down.

Maintains a reference to the timer used for file locks and logging.

Parses a connection URL into parts.

Since:
1.7.2
Version:
1.7.2
Author:
fred@users

Field Summary
static String S_ALIAS
           
static String S_FILE
           
static String S_HSQL
           
static String S_HSQLS
           
static String S_HTTP
           
static String S_HTTPS
           
static String S_MEM
           
static String S_RES
           
static String S_URL_PREFIX
           
 
Constructor Summary
DatabaseManager()
           
 
Method Summary
static void closeDatabases(int mode)
          Closes all the databases using the given mode.
static Vector getDatabasePaths()
          Returns a vector containing the paths for all the databases.
static Session newSession(String type, String path, String user, String password, boolean ifexists, HsqlProperties props)
          Used by in-process connections and by Servlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

S_MEM

public static final String S_MEM
See Also:
Constant Field Values

S_FILE

public static final String S_FILE
See Also:
Constant Field Values

S_RES

public static final String S_RES
See Also:
Constant Field Values

S_ALIAS

public static final String S_ALIAS
See Also:
Constant Field Values

S_HSQL

public static final String S_HSQL
See Also:
Constant Field Values

S_HSQLS

public static final String S_HSQLS
See Also:
Constant Field Values

S_HTTP

public static final String S_HTTP
See Also:
Constant Field Values

S_HTTPS

public static final String S_HTTPS
See Also:
Constant Field Values

S_URL_PREFIX

public static final String S_URL_PREFIX
See Also:
Constant Field Values
Constructor Detail

DatabaseManager

public DatabaseManager()
Method Detail

getDatabasePaths

public static Vector getDatabasePaths()
Returns a vector containing the paths for all the databases.


closeDatabases

public static void closeDatabases(int mode)
Closes all the databases using the given mode.

CLOSEMODE_IMMEDIATELY = -1; CLOSEMODE_NORMAL = 0; CLOSEMODE_COMPACT = 1; CLOSEMODE_SCRIPT = 2;


newSession

public static Session newSession(String type,
                                 String path,
                                 String user,
                                 String password,
                                 boolean ifexists,
                                 HsqlProperties props)
                          throws HsqlException
Used by in-process connections and by Servlet

Throws:
HsqlException


Copyright © 2001 - 2004 HSQL Development Group. All Rights Reserved.