|
DODS 7.2 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lutris.appserver.server.sql.standard.StandardLogicalDatabase
public class 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.lang.String |
dbType
The database vendor type. |
protected java.sql.Driver |
driver
Driver object object. |
protected java.lang.String |
driverClassName
DriverClassName |
protected ObjectIdAllocator |
objectIdAllocator
Object id manager. |
static java.lang.String |
PARAMNAME_DRIV_DEP_CLASS
|
protected AbstractDBTransactionFactory |
transactionFactory
Database Manager Transaction Factory. |
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. |
|
StandardLogicalDatabase(java.lang.String dbName,
Config dbConfig,
DatabaseManagerConfiguration DbManagerConf)
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. |
ObjectId |
allocateObjectId(java.lang.String tableName)
Return an object id for this logical database. |
void |
checkOId(ObjectId oid)
Check does oid belong to Object id's range [minOId, currentOId] |
void |
checkOId(ObjectId oid,
java.lang.String tableName)
Check does oid belong to Object id's range [minOId, currentOId] |
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. |
DatabaseConfiguration |
getDatabaseConfiguration()
Return conf parameters for current database |
boolean |
getDisableFetchSizeWithMaxRows()
Return value of DisableFetchSizeWithMaxRows property |
java.lang.String |
getDriverClassName()
Return a driver class of the logical database. |
DriverDependencies |
getDriverDependencies()
Method getDriverDependencies |
java.lang.String |
getDriverProperty(java.lang.String paramName)
Return a driver property from database vendor configutation file. |
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. |
int |
getResultSetConcurrency()
Return value of ResultSetType property |
int |
getResultSetType()
Return value of ResultSetType property |
java.lang.String |
getType()
Return a description of the logical database type. |
boolean |
getUseCursorName()
Return value of UseCursorName property |
void |
init(java.lang.String dbName,
Config dbConfig)
|
void |
init(java.lang.String dbName,
Config dbConfig,
DatabaseManagerConfiguration DbManagerConf)
|
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 |
setUseCursorName(boolean use)
Change value of UseCursorName property |
void |
setUseCursorName(java.lang.Boolean use)
Change value of UseCursorName property |
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 |
---|
public static final java.lang.String PARAMNAME_DRIV_DEP_CLASS
protected AbstractDBTransactionFactory transactionFactory
protected ConnectionAllocator connectionAllocator
protected ObjectIdAllocator objectIdAllocator
protected java.sql.Driver driver
protected java.lang.String driverClassName
protected java.lang.String dbName
protected java.lang.String dbType
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.
ConfigException
- If there is an error in the
configuration file.
java.sql.SQLException
- If a SQL error occurs.public StandardLogicalDatabase(java.lang.String dbName, Config dbConfig, DatabaseManagerConfiguration DbManagerConf) throws ConfigException, java.sql.SQLException
dbName
- The logical name of the database. Used todbConfig
- The configuration object for this logical
database. get config parameters.DbManagerConf
- The configuration object of DatabaseManager
ConfigException
- If there is an error in the
configuration file.
java.sql.SQLException
- If a SQL error occurs.Method Detail |
---|
public void init(java.lang.String dbName, Config dbConfig) throws ConfigException, java.sql.SQLException
init
in interface LogicalDatabase
ConfigException
java.sql.SQLException
public void init(java.lang.String dbName, Config dbConfig, DatabaseManagerConfiguration DbManagerConf) throws ConfigException, java.sql.SQLException
ConfigException
java.sql.SQLException
public void checkOId(ObjectId oid) throws ObjectIdException
checkOId
in interface LogicalDatabase
oid
- oid which will be checked.
ObjectIdException
- If a oid does't belong to range.public void checkOId(ObjectId oid, java.lang.String tableName) throws ObjectIdException
oid
- oid which will be checked.tableName
- Database table name
ObjectIdException
- If a oid does't belong to range.public ConnectionAllocator loadConnectionAllocator(Config connectionConfig) throws ConfigException
connectionConfig
- The configuration object for the
connection allocator.
ConfigException
- If there is an error in the
configuration file.public ObjectIdAllocator loadObjectIdAllocator(Config objIdConfig) throws ConfigException
objIdConfig
- The configuration object for the object id
allocator.
ConfigException
- If there is an error in the
configuration file.public DBConnection allocateConnection() throws java.sql.SQLException
allocateConnection
in interface LogicalDatabase
java.sql.SQLException
- if SQL error occurs allocating
connection.public ObjectId allocateObjectId() throws ObjectIdException
allocateObjectId
in interface LogicalDatabase
ObjectIdException
- if an error occurs allocating an
object id.public ObjectId allocateObjectId(java.lang.String tableName) throws ObjectIdException
tableName
- Database table name
ObjectIdException
- if an error occurs allocating an
object id.public DBTransaction createTransaction() throws java.sql.SQLException
createTransaction
in interface LogicalDatabase
java.sql.SQLException
- if a SQL error occurs.public DBQuery createQuery() throws java.sql.SQLException
createQuery
in interface LogicalDatabase
java.sql.SQLException
- if a SQL error occurs.public void shutdown()
shutdown
in interface LogicalDatabase
public java.lang.String getName()
getName
in interface LogicalDatabase
public java.lang.String getType()
getType
in interface LogicalDatabase
public java.lang.String getDriverClassName()
public java.lang.String getDriverProperty(java.lang.String paramName)
paramName
- Parameter Name
public int getActiveConnectionCount()
getActiveConnectionCount
in interface LogicalDatabase
public int getMaxConnectionCount()
getMaxConnectionCount
in interface LogicalDatabase
public java.util.Date getMaxConnectionCountDate()
getMaxConnectionCountDate
in interface LogicalDatabase
Date
when the maximum connection count
occured.public void resetMaxConnectionCount()
resetMaxConnectionCount
in interface LogicalDatabase
public long getRequestCount()
getRequestCount
in interface LogicalDatabase
public DatabaseConfiguration getDatabaseConfiguration()
public boolean getDisableFetchSizeWithMaxRows()
public boolean getUseCursorName()
public void setUseCursorName(boolean use)
use
- public void setUseCursorName(java.lang.Boolean use)
use
- public int getResultSetType()
public int getResultSetConcurrency()
public DriverDependencies getDriverDependencies()
|
DODS 7.2 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |