|
DODS 7.1 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.StandardObjectIdAllocator
public class StandardObjectIdAllocator
Object ids can only be created via this manager. Ensures that all object ids are unique across all objects in this logical database. Also ensures good performance for allocating object ids.
The configuration data is specified in the section:
DatabaseManager.DB.dbName.ObjectId
Configuration fields are:
CacheSize
-
The number of object id's to cache between database queries. Optional,
if not specified, then it defaults to 1024.
MinValue
-
The starting number of Object ID allocation. This will only be used
if the Object ID table is empty and thus is useful in development
and testing. Optional, if not specified it defaults to
100000000000000000. Note that the largest number that can be
associated with an OID in LBS is "database: DECIMAL(19,0)"
Field Summary | |
---|---|
protected com.lutris.appserver.server.sql.LogicalDatabase |
logicalDatabase
Reference to the logical database for easy access to the connection pool. |
protected java.lang.String |
primaryLogicalDatabaseName
Name of primary logical database for access to the objectId table. |
Constructor Summary | |
---|---|
StandardObjectIdAllocator(com.lutris.appserver.server.sql.LogicalDatabase lDb,
com.lutris.util.Config objIdConfig)
Initialize the object id manager. |
Method Summary | |
---|---|
com.lutris.appserver.server.sql.ObjectId |
allocate()
Allocates a new object id. |
com.lutris.appserver.server.sql.ObjectId |
allocate(java.lang.String tableName)
Allocate a new and unique object id for given database table. |
protected com.lutris.appserver.server.sql.DBConnection |
allocateConnection()
|
void |
checkOId(com.lutris.appserver.server.sql.ObjectId oid)
Check if oid belongs to Object id's range [minOId, currentOId] |
void |
checkOId(com.lutris.appserver.server.sql.ObjectId oid,
java.lang.String tableName)
Check does oid belong to Object id's range [minOId, currentOId] |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected com.lutris.appserver.server.sql.LogicalDatabase logicalDatabase
protected java.lang.String primaryLogicalDatabaseName
Constructor Detail |
---|
public StandardObjectIdAllocator(com.lutris.appserver.server.sql.LogicalDatabase lDb, com.lutris.util.Config objIdConfig) throws com.lutris.util.ConfigException
lDb
- LogicalDatabase.objIdConfig
- LogicalDatabase Config object.
com.lutris.util.ConfigException
- if bad configuration information is
given in the config file.Method Detail |
---|
public void checkOId(com.lutris.appserver.server.sql.ObjectId oid) throws com.lutris.appserver.server.sql.ObjectIdException
checkOId
in interface ObjectIdAllocator
oid
- oid which will be checked.
com.lutris.appserver.server.sql.ObjectIdException
- If a oid does't belong to range.public void checkOId(com.lutris.appserver.server.sql.ObjectId oid, java.lang.String tableName) throws com.lutris.appserver.server.sql.ObjectIdException
oid
- oid which will be checked.tableName
- Database table name
com.lutris.appserver.server.sql.ObjectIdException
- If a oid does't belong to range.public com.lutris.appserver.server.sql.ObjectId allocate()
allocate
in interface ObjectIdAllocator
public com.lutris.appserver.server.sql.ObjectId allocate(java.lang.String tableName)
tableName
- Database table name.
protected com.lutris.appserver.server.sql.DBConnection allocateConnection() throws java.sql.SQLException
java.sql.SQLException
|
DODS 7.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |