Source Code Cross Referenced for Const4.java in  » Database-DBMS » db4o-6.4 » com » db4o » internal » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Database DBMS » db4o 6.4 » com.db4o.internal 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Copyright (C) 2004 - 2007  db4objects Inc.  http://www.db4o.com
002:
003:        This file is part of the db4o open source object database.
004:
005:        db4o is free software; you can redistribute it and/or modify it under
006:        the terms of version 2 of the GNU General Public License as published
007:        by the Free Software Foundation and as clarified by db4objects' GPL 
008:        interpretation policy, available at
009:        http://www.db4o.com/about/company/legalpolicies/gplinterpretation/
010:        Alternatively you can write to db4objects, Inc., 1900 S Norfolk Street,
011:        Suite 350, San Mateo, CA 94403, USA.
012:
013:        db4o is distributed in the hope that it will be useful, but WITHOUT ANY
014:        WARRANTY; without even the implied warranty of MERCHANTABILITY or
015:        FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
016:        for more details.
017:
018:        You should have received a copy of the GNU General Public License along
019:        with this program; if not, write to the Free Software Foundation, Inc.,
020:        59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. */
021:        package com.db4o.internal;
022:
023:        import com.db4o.*;
024:
025:        /**
026:         * @exclude
027:         * 
028:         *  TODO: Split into separate enums with defined range and values. 
029:         */
030:        public final class Const4 {
031:            public static final byte YAPFILEVERSION = 4;
032:
033:            public static final byte YAPBEGIN = (byte) '{';
034:            public static final byte YAPFILE = (byte) 'Y';
035:            public static final byte YAPID = (byte) '#';
036:            public static final byte YAPPOINTER = (byte) '>';
037:            public static final byte YAPCLASSCOLLECTION = (byte) 'A';
038:            public static final byte YAPCLASS = (byte) 'C';
039:            public static final byte YAPFIELD = (byte) 'F';
040:            public static final byte YAPOBJECT = (byte) 'O';
041:            public static final byte YAPARRAY = (byte) 'N';
042:            public static final byte YAPARRAYN = (byte) 'Z';
043:            public static final byte YAPINDEX = (byte) 'X';
044:            public static final byte YAPSTRING = (byte) 'S';
045:            public static final byte YAPLONG = (byte) 'l';
046:            public static final byte YAPINTEGER = (byte) 'i';
047:            public static final byte YAPBOOLEAN = (byte) '=';
048:            public static final byte YAPDOUBLE = (byte) 'd';
049:            public static final byte YAPBYTE = (byte) 'b';
050:            public static final byte YAPSHORT = (byte) 's';
051:            public static final byte YAPCHAR = (byte) 'c';
052:            public static final byte YAPFLOAT = (byte) 'f';
053:            public static final byte YAPEND = (byte) '}';
054:            public static final byte YAPNULL = (byte) '0';
055:            public static final byte BTREE = (byte) 'T';
056:            public static final byte BTREE_NODE = (byte) 'B';
057:            public static final byte HEADER = (byte) 'H';
058:            public static final byte INTEGER_ARRAY = (byte) 'I';
059:
060:            public static final int IDENTIFIER_LENGTH = (Deploy.debug && Deploy.identifiers) ? 1
061:                    : 0;
062:            public static final int BRACKETS_BYTES = (Deploy.debug && Deploy.brackets) ? 1
063:                    : 0;
064:            public static final int BRACKETS_LENGTH = BRACKETS_BYTES * 2;
065:
066:            public static final int LEADING_LENGTH = IDENTIFIER_LENGTH
067:                    + BRACKETS_BYTES;
068:            public static final int ADDED_LENGTH = IDENTIFIER_LENGTH
069:                    + BRACKETS_LENGTH;
070:
071:            public static final int SHORT_BYTES = 2;
072:            public static final int INTEGER_BYTES = (Deploy.debug && Deploy.debugLong) ? 11
073:                    : 4;
074:            public static final int LONG_BYTES = (Deploy.debug && Deploy.debugLong) ? 20
075:                    : 8;
076:            public static final int CHAR_BYTES = 2;
077:
078:            public static final int UNSPECIFIED = Integer.MIN_VALUE + 100; // make sure we don't fall over the -1 cliff
079:
080:            public static final int INT_LENGTH = INTEGER_BYTES + ADDED_LENGTH;
081:            public static final int ID_LENGTH = INT_LENGTH;
082:            public static final int LONG_LENGTH = LONG_BYTES + ADDED_LENGTH;
083:
084:            public static final int WRITE_LOOP = (INTEGER_BYTES - 1) * 8;
085:
086:            public static final int OBJECT_LENGTH = ADDED_LENGTH;
087:
088:            public static final int POINTER_LENGTH = (INT_LENGTH * 2)
089:                    + ADDED_LENGTH;
090:
091:            public static final int MESSAGE_LENGTH = INT_LENGTH * 2 + 1;
092:
093:            public static final byte SYSTEM_TRANS = (byte) 's';
094:            public static final byte USER_TRANS = (byte) 'u';
095:
096:            // debug constants
097:            public static final byte XBYTE = (byte) 'X';
098:
099:            // TODO: This one is a terrible low-frequency blunder in YapArray.writeClass!!!
100:            // If YapClass-ID == 99999 (not very likely) then we will get IGNORE_ID. Change
101:            // to -Integer.MAX_VALUE or protect 99999 in YapFile.getPointerSlot() 
102:            public static final int IGNORE_ID = -99999;
103:
104:            // This is a hard coded 2 Gig-Limit for YapClass-IDs.
105:            // TODO: get rid of magic numbers like this one
106:            public static final int PRIMITIVE = -2000000000;
107:
108:            // array type information
109:            public static final int TYPE_ARRAY = 3;
110:            public static final int TYPE_NARRAY = 4;
111:
112:            // message levels
113:            public static final int NONE = 0; // Use if > NONE: normal messages
114:            public static final int STATE = 1; // if > STATE: state messages
115:            public static final int ACTIVATION = 2; // if > ACTIVATION: activation messages
116:
117:            public static final int TRANSIENT = -1;
118:            public static final int ADD_MEMBERS_TO_ID_TREE_ONLY = 0;
119:            public static final int ADD_TO_ID_TREE = 1;
120:
121:            // String Encoding
122:            public static final byte ISO8859 = (byte) 1;
123:            public static final byte UNICODE = (byte) 2;
124:
125:            // Timings
126:            public static final int LOCK_TIME_INTERVAL = 1000;
127:
128:            // 10 minutes until clients are disconnected, (5 minutes until they get pinged) 
129:            public static final int SERVER_SOCKET_TIMEOUT = Debug.longTimeOuts ? 1000000
130:                    : 600000;
131:            public static final int CLIENT_SOCKET_TIMEOUT = SERVER_SOCKET_TIMEOUT;
132:
133:            // TODO: Consider to make configurable
134:            public static final int MAXIMUM_BLOCK_SIZE = 70000000; // 70 MB   
135:            public static final int MAXIMUM_ARRAY_ENTRIES = 7000000; // 7 Million 
136:            public static final int MAXIMUM_ARRAY_ENTRIES_PRIMITIVE = MAXIMUM_ARRAY_ENTRIES * 100; // 70 MB for byte arrays
137:
138:            public final static Class CLASS_COMPARE = com.db4o.config.Compare.class;
139:            public final static Class CLASS_DB4OTYPE = com.db4o.types.Db4oType.class;
140:            public final static Class CLASS_DB4OTYPEIMPL = Db4oTypeImpl.class;
141:            public final static Class CLASS_INTERNAL = Internal4.class;
142:            public final static Class CLASS_UNVERSIONED = com.db4o.types.Unversioned.class;
143:            public final static Class CLASS_OBJECT = new Object().getClass();
144:            public final static Class CLASS_OBJECTCONTAINER = ObjectContainer.class;
145:            public final static Class CLASS_REPLICATIONRECORD = new ReplicationRecord()
146:                    .getClass();
147:            public final static Class CLASS_STATICFIELD = new StaticField()
148:                    .getClass();
149:            public final static Class CLASS_STATICCLASS = new StaticClass()
150:                    .getClass();
151:            public final static Class CLASS_TRANSIENTCLASS = com.db4o.types.TransientClass.class;
152:
153:            public static final String EMBEDDED_CLIENT_USER = "embedded client";
154:
155:            // bits in YapMeta.i_state
156:            // and reuse in other classes 
157:            public static final int CLEAN = 0;
158:            public static final int ACTIVE = 1;
159:            public static final int PROCESSING = 2;
160:            public static final int CACHED_DIRTY = 3;
161:            public static final int CONTINUE = 4;
162:            public static final int STATIC_FIELDS_STORED = 5;
163:            public static final int CHECKED_CHANGES = 6;
164:            public static final int DEAD = 7;
165:            public static final int READING = 8;
166:
167:            public static final int OLD = -1;
168:            public static final int NEW = 1;
169:
170:            public static final UnicodeStringIO stringIO = new UnicodeStringIO();
171:
172:            // system classes that need to get loaded first
173:            public static final Class[] ESSENTIAL_CLASSES = {
174:            // StaticClass should load Staticfield
175:
176:                    // TODO: remove unnecessary
177:
178:                    CLASS_STATICFIELD, CLASS_STATICCLASS };
179:
180:            public static final String VIRTUAL_FIELD_PREFIX = "v4o";
181:
182:            public static final int MAX_STACK_DEPTH = 20;
183:
184:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.