|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.lutris.appserver.server.sql.standard.StandardLogicalDatabase
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.
Field Summary | |
protected 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 ObjectIdAllocator |
objectIdAllocator
Object id manager. |
Constructor Summary | |
StandardLogicalDatabase()
Default constructor to configure a single logical database. |
|
StandardLogicalDatabase(java.lang.String dbName,
Config dbConfig)
Creates and configures a single logical database. |
Method Summary | |
DBConnection |
allocateConnection()
Return the connection allocator object associated with this logical database. |
ObjectId |
allocateObjectId()
Return an object id for this logical database. |
DBQuery |
createQuery()
Return a query for use on this logical database. |
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,
Config dbConfig)
Initialize a single logical database. |
ConnectionAllocator |
loadConnectionAllocator(Config connectionConfig)
Return the connection allocator. |
ObjectIdAllocator |
loadObjectIdAllocator(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 |
protected ConnectionAllocator connectionAllocator
protected ObjectIdAllocator objectIdAllocator
protected java.sql.Driver driver
protected java.lang.String dbName
Constructor Detail |
public StandardLogicalDatabase()
init()
method must be called to
configure the database.public StandardLogicalDatabase(java.lang.String dbName, Config dbConfig) throws ConfigException, java.sql.SQLException
dbName
- The logical name of the database. Used todbConfig
- The configuration object for this logical database.
get config parameters.Method Detail |
public void init(java.lang.String dbName, Config dbConfig) throws ConfigException, java.sql.SQLException
dbName
- The logical name of the database. Used todbConfig
- The configuration object for this logical database.
get config parameters.public ConnectionAllocator loadConnectionAllocator(Config connectionConfig) throws ConfigException
connectionConfig
- The configuration object for the connection allocator.public ObjectIdAllocator loadObjectIdAllocator(Config objIdConfig) throws ConfigException
objIdConfig
- The configuration object for the object id allocator.public DBConnection allocateConnection() throws java.sql.SQLException
public ObjectId allocateObjectId() throws ObjectIdException
public DBTransaction createTransaction() throws java.sql.SQLException
public DBQuery createQuery() throws java.sql.SQLException
public void shutdown()
public java.lang.String getName()
public java.lang.String getType()
public int getActiveConnectionCount()
public int getMaxConnectionCount()
public java.util.Date getMaxConnectionCountDate()
Date
when the maximum connection
count occured.public void resetMaxConnectionCount()
public long getRequestCount()
|
Enhydra 3.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |