KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > db4o > PBootRecord


1 /* Copyright (C) 2004 - 2006 db4objects Inc. http://www.db4o.com
2
3 This file is part of the db4o open source object database.
4
5 db4o is free software; you can redistribute it and/or modify it under
6 the terms of version 2 of the GNU General Public License as published
7 by the Free Software Foundation and as clarified by db4objects' GPL
8 interpretation policy, available at
9 http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
10 Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
11 Suite 350, San Mateo, CA 94403, USA.
12
13 db4o is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 for more details.
17
18 You should have received a copy of the GNU General Public License along
19 with this program; if not, write to the Free Software Foundation, Inc.,
20 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */

21 package com.db4o;
22
23 import com.db4o.ext.*;
24 import com.db4o.inside.*;
25
26 /**
27  * Old database boot record class.
28  *
29  * This class was responsible for storing the last timestamp id,
30  * for holding a reference to the Db4oDatabase object of the
31  * ObjectContainer and for holding on to the UUID index.
32  *
33  * This class is no longer needed with the change to the new
34  * fileheader. It still has to stay here to be able to read
35  * old databases.
36  *
37  * @exclude
38  * @persistent
39  */

40 public class PBootRecord extends P1Object implements Db4oTypeImpl, Internal4{
41
42     public Db4oDatabase i_db;
43
44     public long i_versionGenerator;
45
46     public MetaIndex i_uuidMetaIndex;
47
48     public int activationDepth() {
49         return Integer.MAX_VALUE;
50     }
51
52     public MetaIndex getUUIDMetaIndex(){
53         return i_uuidMetaIndex;
54     }
55
56     public void write(YapFile file) {
57         SystemData systemData = file.systemData();
58         i_versionGenerator = systemData.lastTimeStampID();
59         i_db = systemData.identity();
60         file.showInternalClasses(true);
61         store(2);
62         file.showInternalClasses(false);
63     }
64
65 }
Popular Tags