|
|||||||||
| Home >> All >> com >> lutris >> appserver >> server >> sql >> [ standard overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.lutris.appserver.server.sql.standard
Class StandardLogicalDatabase

java.lang.Objectcom.lutris.appserver.server.sql.standard.StandardLogicalDatabase
- All Implemented Interfaces:
- com.lutris.appserver.server.sql.LogicalDatabase
- public class StandardLogicalDatabase
- extends java.lang.Object
- implements com.lutris.appserver.server.sql.LogicalDatabase
- extends java.lang.Object
Represents a logical database. Each logical database has a connection
allocator and a object id allocator. The standard implementation of
a local database is used when the database is described as of
type Standard in
DatabaseManager.DB.dbname.ClassType
The configuration data is specified in the section:
DatabaseManager.DB.dbName
The following is a description of the sub fields:
-
JdbcDriver- The JDBC driver to use to access that database. Manditory. E.g. "intersolv.jdbc.sequelink.SequeLinkDriver" -
Connection- This section is passed onto the connection allocator. See for details on connection allocator sub fields.ObjectId- This section is passed onto the object id allocator. See for details on object id allocator sub fields.
- Since:
- LBS1.8
- Version:
- $Revision: 1.6.12.1 $
| Field Summary | |
protected com.lutris.appserver.server.sql.ConnectionAllocator |
connectionAllocator
Database connection allocator. |
protected java.lang.String |
dbName
The symbolic name of this logical database. |
protected java.sql.Driver |
driver
Driver object object. |
protected com.lutris.appserver.server.sql.ObjectIdAllocator |
objectIdAllocator
Object id manager. |
| Constructor Summary | |
StandardLogicalDatabase()
Default constructor to configure a single logical database. |
|
StandardLogicalDatabase(java.lang.String dbName,
com.lutris.util.Config dbConfig)
Creates and configures a single logical database. |
|
| Method Summary | |
com.lutris.appserver.server.sql.DBConnection |
allocateConnection()
Return the connection allocator object associated with this logical database. |
com.lutris.appserver.server.sql.ObjectId |
allocateObjectId()
Return an object id for this logical database. |
com.lutris.appserver.server.sql.DBQuery |
createQuery()
Return a query for use on this logical database. |
com.lutris.appserver.server.sql.DBTransaction |
createTransaction()
Return a transaction for use on this logical database. |
int |
getActiveConnectionCount()
Return the number of currently active connections. |
int |
getMaxConnectionCount()
Return the maximum number of connections active at one time. |
java.util.Date |
getMaxConnectionCountDate()
Return the time when the maximum connection count occured. |
java.lang.String |
getName()
Return the symbolic name of this logical database. |
long |
getRequestCount()
Return the number of database requests. |
java.lang.String |
getType()
Return a description of the logical database type. |
void |
init(java.lang.String dbName,
com.lutris.util.Config dbConfig)
Initialize a single logical database. |
com.lutris.appserver.server.sql.ConnectionAllocator |
loadConnectionAllocator(com.lutris.util.Config connectionConfig)
Return the connection allocator. |
com.lutris.appserver.server.sql.ObjectIdAllocator |
loadObjectIdAllocator(com.lutris.util.Config objIdConfig)
Return the object id allocator. |
void |
resetMaxConnectionCount()
Reset the maximum connection count and date. |
void |
shutdown()
Immediately shutdown the logical database. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
connectionAllocator
protected com.lutris.appserver.server.sql.ConnectionAllocator connectionAllocator
- Database connection allocator.
objectIdAllocator
protected com.lutris.appserver.server.sql.ObjectIdAllocator objectIdAllocator
- Object id manager.
driver
protected java.sql.Driver driver
- Driver object object. Important: a reference to this must be
maintained or the driver class might be garbage collected out from
under us.
dbName
protected java.lang.String dbName
- The symbolic name of this logical database.
| Constructor Detail |
StandardLogicalDatabase
public StandardLogicalDatabase()
- Default constructor to configure a single logical database.
Note that the
init()method must be called to configure the database.
StandardLogicalDatabase
public StandardLogicalDatabase(java.lang.String dbName, com.lutris.util.Config dbConfig) throws com.lutris.util.ConfigException, java.sql.SQLException
- Creates and configures a single logical database.
| Method Detail |
init
public void init(java.lang.String dbName, com.lutris.util.Config dbConfig) throws com.lutris.util.ConfigException, java.sql.SQLException
- Initialize a single logical database. Used after the default
constructor is called.
- Specified by:
initin interfacecom.lutris.appserver.server.sql.LogicalDatabase
loadConnectionAllocator
public com.lutris.appserver.server.sql.ConnectionAllocator loadConnectionAllocator(com.lutris.util.Config connectionConfig) throws com.lutris.util.ConfigException
- Return the connection allocator.
loadObjectIdAllocator
public com.lutris.appserver.server.sql.ObjectIdAllocator loadObjectIdAllocator(com.lutris.util.Config objIdConfig) throws com.lutris.util.ConfigException
- Return the object id allocator.
allocateConnection
public com.lutris.appserver.server.sql.DBConnection allocateConnection() throws java.sql.SQLException
- Return the connection allocator object associated with this
logical database.
- Specified by:
allocateConnectionin interfacecom.lutris.appserver.server.sql.LogicalDatabase
allocateObjectId
public com.lutris.appserver.server.sql.ObjectId allocateObjectId() throws com.lutris.appserver.server.sql.ObjectIdException
- Return an object id for this logical database.
- Specified by:
allocateObjectIdin interfacecom.lutris.appserver.server.sql.LogicalDatabase
createTransaction
public com.lutris.appserver.server.sql.DBTransaction createTransaction() throws java.sql.SQLException
- Return a transaction for use on this logical database.
- Specified by:
createTransactionin interfacecom.lutris.appserver.server.sql.LogicalDatabase
createQuery
public com.lutris.appserver.server.sql.DBQuery createQuery() throws java.sql.SQLException
- Return a query for use on this logical database.
- Specified by:
createQueryin interfacecom.lutris.appserver.server.sql.LogicalDatabase
shutdown
public void shutdown()
- Immediately shutdown the logical database. This is
normally only called by the database manager on shutdown.
- Specified by:
shutdownin interfacecom.lutris.appserver.server.sql.LogicalDatabase
getName
public java.lang.String getName()
- Return the symbolic name of this logical database.
- Specified by:
getNamein interfacecom.lutris.appserver.server.sql.LogicalDatabase
getType
public java.lang.String getType()
- Return a description of the logical database type.
- Specified by:
getTypein interfacecom.lutris.appserver.server.sql.LogicalDatabase
getActiveConnectionCount
public int getActiveConnectionCount()
- Return the number of currently active connections.
- Specified by:
getActiveConnectionCountin interfacecom.lutris.appserver.server.sql.LogicalDatabase
getMaxConnectionCount
public int getMaxConnectionCount()
- Return the maximum number of connections active at one time.
- Specified by:
getMaxConnectionCountin interfacecom.lutris.appserver.server.sql.LogicalDatabase
getMaxConnectionCountDate
public java.util.Date getMaxConnectionCountDate()
- Return the time when the maximum connection count occured.
- Specified by:
getMaxConnectionCountDatein interfacecom.lutris.appserver.server.sql.LogicalDatabase
resetMaxConnectionCount
public void resetMaxConnectionCount()
- Reset the maximum connection count and date.
- Specified by:
resetMaxConnectionCountin interfacecom.lutris.appserver.server.sql.LogicalDatabase
getRequestCount
public long getRequestCount()
- Return the number of database requests.
- Specified by:
getRequestCountin interfacecom.lutris.appserver.server.sql.LogicalDatabase
|
|||||||||
| Home >> All >> com >> lutris >> appserver >> server >> sql >> [ standard overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.lutris.appserver.server.sql.standard.StandardLogicalDatabase