KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > lutris > appserver > server > sql > informix > InformixObjectIdAllocator


1 /*
2  * Enhydra Java Application Server Project
3  *
4  * The contents of this file are subject to the Enhydra Public License
5  * Version 1.1 (the "License"); you may not use this file except in
6  * compliance with the License. You may obtain a copy of the License on
7  * the Enhydra web site ( http://www.enhydra.org/ ).
8  *
9  * Software distributed under the License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
11  * the License for the specific terms governing rights and limitations
12  * under the License.
13  *
14  * The Initial Developer of the Enhydra Application Server is Lutris
15  * Technologies, Inc. The Enhydra Application Server and portions created
16  * by Lutris Technologies, Inc. are Copyright Lutris Technologies, Inc.
17  * All Rights Reserved.
18  *
19  * Contributor(s):
20  *
21  * $Id: InformixObjectIdAllocator.java,v 1.1 2004/09/03 13:42:52 sinisa Exp $
22  */

23 package com.lutris.appserver.server.sql.informix;
24
25 import com.lutris.appserver.server.sql.LogicalDatabase;
26 import com.lutris.appserver.server.sql.standard.StandardObjectIdAllocator;
27 import com.lutris.util.Config;
28 import com.lutris.util.ConfigException;
29
30 /**
31  * Informix Object ids can only be created via this manager.
32  * Ensures that all object ids are unique across all
33  * objects in this logical database. Also ensures good performance
34  * for allocating object ids.
35  * <P>
36  * The configuration data is specified in the section:
37  * <CODE>DatabaseManager.DB.<I>dbName</I>.ObjectId</CODE>
38  * <P>
39  * Configuration fields are:
40  * <UL>
41  * <LI> <CODE>CacheSize</CODE> -
42  * The number of object id's to cache between database queries. Optional,
43  * if not specified, then it defaults to 1024.
44  * <LI> <CODE>MinValue</CODE> -
45  * The starting number of Object ID allocation. This will only be used
46  * if the Object ID table is empty and thus is useful in development
47  * and testing. Optional, if not specified it defaults to
48  * 100000000000000000. Note that the largest number that can be
49  * associated with an OID in LBS is "database: DECIMAL(19,0)"
50  * </UL>
51  *
52  * @author Kyle Clark
53  * @since LBS1.8
54  * @version $Revision: 1.1 $
55  */

56 public class InformixObjectIdAllocator extends StandardObjectIdAllocator {
57
58     /**
59      * Initialize the object id manager.
60      *
61      * @param logicalDatabase LogicalDatabase
62      * @param objIdConfig Logical database Config object.
63      * @exception ConfigException if bad configuration information is
64      * given in the config file.
65      */

66     protected InformixObjectIdAllocator(LogicalDatabase logicalDatabase,
67             Config objIdConfig)
68         throws ConfigException {
69         super(logicalDatabase, objIdConfig);
70     }
71 }
72
Popular Tags