Source Code Cross Referenced for DataHandler.java in  » Database-DBMS » h2database » org » h2 » store » 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 » h2database » org.h2.store 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2004-2008 H2 Group. Licensed under the H2 License, Version 1.0
003:         * (http://h2database.com/html/license.html).
004:         * Initial Developer: H2 Group
005:         */
006:        package org.h2.store;
007:
008:        import java.sql.SQLException;
009:
010:        import org.h2.util.SmallLRUCache;
011:        import org.h2.value.Value;
012:
013:        /**
014:         * A data handler contains a number of callback methods.
015:         * The most important implementing class is a database.
016:         */
017:        public interface DataHandler {
018:
019:            /**
020:             * Check if text storage is used.
021:             *
022:             * @return if text storage is used.
023:             */
024:            boolean getTextStorage();
025:
026:            /**
027:             * Get the database path.
028:             *
029:             * @return the database path
030:             */
031:            String getDatabasePath();
032:
033:            /**
034:             * Open a file at the given location.
035:             *
036:             * @param name the file name
037:             * @param mode the mode
038:             * @param mustExist whether the file must already exist
039:             * @return the file
040:             */
041:            FileStore openFile(String name, String mode, boolean mustExist)
042:                    throws SQLException;
043:
044:            /**
045:             * Calculate the checksum for the byte array.
046:             *
047:             * @param data the byte array
048:             * @param start the starting offset
049:             * @param end the end offset
050:             * @return the checksum
051:             */
052:            int getChecksum(byte[] data, int start, int end);
053:
054:            /**
055:             * Check if the simulated power failure occured.
056:             * This call will decrement the countdown.
057:             *
058:             * @throws SQLException if the simulated power failure occured
059:             */
060:            void checkPowerOff() throws SQLException;
061:
062:            /**
063:             * Check if writing is allowed.
064:             *
065:             * @throws SQLException if it is not allowed
066:             */
067:            void checkWritingAllowed() throws SQLException;
068:
069:            /**
070:             * Free up disk space if possible.
071:             * This method is called if more space is needed.
072:             *
073:             * @throws SQLException if no more space could be freed
074:             */
075:            void freeUpDiskSpace() throws SQLException;
076:
077:            /**
078:             * Called when the checksum was invalid.
079:             *
080:             * @throws SQLException if this should not be ignored
081:             */
082:            void handleInvalidChecksum() throws SQLException;
083:
084:            /**
085:             * Compare two values.
086:             *
087:             * @param a the first value
088:             * @param b the second value
089:             * @return 0 for equal, 1 if a is larger than b, and -1 otherwise
090:             */
091:            int compareTypeSave(Value a, Value b) throws SQLException;
092:
093:            /**
094:             * Get the maximum length of a in-place large object
095:             *
096:             * @return the maximum size
097:             */
098:            int getMaxLengthInplaceLob();
099:
100:            /**
101:             * Get the compression algorithm used for large objects.
102:             *
103:             * @param type the data type (CLOB or BLOB)
104:             * @return the compression algorithm, or null
105:             */
106:            String getLobCompressionAlgorithm(int type);
107:
108:            /**
109:             * Get the next object id.
110:             * This method is not required if LOB_FILES_IN_DIRECTORIES is enabled.
111:             *
112:             * @param needFresh if a fresh id is required
113:             * @param dataFile true if the id is for the data file
114:             * @return the new id
115:             */
116:            int allocateObjectId(boolean needFresh, boolean dataFile);
117:
118:            /**
119:             * Create a temporary file and return the file name.
120:             *
121:             * @return the file name
122:             */
123:            String createTempFile() throws SQLException;
124:
125:            /**
126:             * Get the synchronization object for lob operations.
127:             *
128:             * @return the synchronization object
129:             */
130:            Object getLobSyncObject();
131:
132:            /**
133:             * Checks if the lob files stored in directories.
134:             *
135:             * @return true if lob files are stored in directories.
136:             */
137:            boolean getLobFilesInDirectories();
138:
139:            /**
140:             * Get the lob file list cache if it is used.
141:             *
142:             * @return the cache or null
143:             */
144:            SmallLRUCache getLobFileListCache();
145:
146:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.