DODS 5.1 API

com.lutris.appserver.server.sql.standard
Class StandardObjectIdAllocator

java.lang.Object
  |
  +--com.lutris.appserver.server.sql.standard.StandardObjectIdAllocator
All Implemented Interfaces:
ObjectIdAllocator
Direct Known Subclasses:
InformixObjectIdAllocator, OracleObjectIdAllocator

public class StandardObjectIdAllocator
extends java.lang.Object
implements ObjectIdAllocator

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:

Since:
LBS1.8
Version:
$Revision: 1.2 $
Author:
Kyle Clark
, Paul Morgan

Constructor Summary
protected StandardObjectIdAllocator(LogicalDatabase logicalDatabase, com.lutris.util.Config objIdConfig)
          Initialize the object id manager.
 
Method Summary
 ObjectId allocate()
          Allocates a new object id.
 void checkOId(ObjectId oid)
          Check if oid belongs 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
 

Constructor Detail

StandardObjectIdAllocator

protected StandardObjectIdAllocator(LogicalDatabase logicalDatabase,
                                    com.lutris.util.Config objIdConfig)
                             throws com.lutris.util.ConfigException
Initialize the object id manager.

Throws:
com.lutris.util.ConfigException - if bad configuration information is given in the config file.
Method Detail

checkOId

public void checkOId(ObjectId oid)
              throws ObjectIdException
Check if oid belongs to Object id's range [minOId, currentOId]

Specified by:
checkOId in interface ObjectIdAllocator
Parameters:
oid - oid which will be checked.
Throws:
ObjectIdException - If a oid does't belong to range.

allocate

public ObjectId allocate()
Allocates a new object id.

Specified by:
allocate in interface ObjectIdAllocator

DODS 5.1 API