Source Code Cross Referenced for DbInternal.java in  » JMX » je » com » sleepycat » je » 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 » JMX » je » com.sleepycat.je 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*-
002:         * See the file LICENSE for redistribution information.
003:         *
004:         * Copyright (c) 2002,2008 Oracle.  All rights reserved.
005:         *
006:         * $Id: DbInternal.java,v 1.44.2.3 2008/01/07 15:14:08 cwl Exp $
007:         */
008:
009:        package com.sleepycat.je;
010:
011:        import java.io.File;
012:        import java.util.Properties;
013:
014:        import com.sleepycat.je.dbi.CursorImpl;
015:        import com.sleepycat.je.dbi.DatabaseImpl;
016:        import com.sleepycat.je.dbi.EnvironmentImpl;
017:        import com.sleepycat.je.dbi.GetMode;
018:        import com.sleepycat.je.txn.Locker;
019:
020:        /**
021:         * For internal use only. It serves to shelter methods that must be public to
022:         * be used by other BDBJE packages but that are not part of the public api
023:         * available to applications.
024:         */
025:        public class DbInternal {
026:
027:            /**
028:             * Proxy to Database.invalidate()
029:             */
030:            public static void dbInvalidate(Database db) {
031:                db.invalidate();
032:            }
033:
034:            /**
035:             * Proxy to Database.setHandleLockOwnerTxn
036:             */
037:            public static void dbSetHandleLocker(Database db, Locker locker) {
038:                db.setHandleLocker(locker);
039:            }
040:
041:            /**
042:             * Proxy to Environment.getDbEnvironment
043:             */
044:            public static EnvironmentImpl envGetEnvironmentImpl(Environment env) {
045:                return env.getEnvironmentImpl();
046:            }
047:
048:            /**
049:             * Proxy to new Cursor(DatabaseImpl, Locker, CursorConfig)
050:             */
051:            public static Cursor newCursor(DatabaseImpl dbImpl, Locker locker,
052:                    CursorConfig cursorConfig) throws DatabaseException {
053:
054:                return new Cursor(dbImpl, locker, cursorConfig);
055:            }
056:
057:            /**
058:             * Proxy to new Cursor.position().
059:             */
060:            public static OperationStatus position(Cursor cursor,
061:                    DatabaseEntry key, DatabaseEntry data, LockMode lockMode,
062:                    boolean first) throws DatabaseException {
063:
064:                return cursor.position(key, data, lockMode, first);
065:            }
066:
067:            /**
068:             * Proxy to new Cursor.retrieveNext().
069:             */
070:            public static OperationStatus retrieveNext(Cursor cursor,
071:                    DatabaseEntry key, DatabaseEntry data, LockMode lockMode,
072:                    GetMode getMode) throws DatabaseException {
073:
074:                return cursor.retrieveNext(key, data, lockMode, getMode);
075:            }
076:
077:            /**
078:             * Proxy to Cursor.advanceCursor()
079:             */
080:            public static boolean advanceCursor(Cursor cursor,
081:                    DatabaseEntry key, DatabaseEntry data) {
082:                return cursor.advanceCursor(key, data);
083:            }
084:
085:            /**
086:             * Proxy to Cursor.getCursorImpl()
087:             */
088:            public static CursorImpl getCursorImpl(Cursor cursor) {
089:                return cursor.getCursorImpl();
090:            }
091:
092:            /**
093:             * Proxy to Database.getDatabase()
094:             */
095:            public static DatabaseImpl dbGetDatabaseImpl(Database db) {
096:                return db.getDatabaseImpl();
097:            }
098:
099:            /**
100:             * Proxy to JoinCursor.getSortedCursors()
101:             */
102:            public static Cursor[] getSortedCursors(JoinCursor cursor) {
103:                return cursor.getSortedCursors();
104:            }
105:
106:            /**
107:             * Proxy to EnvironmentConfig.setLoadPropertyFile()
108:             */
109:            public static void setLoadPropertyFile(EnvironmentConfig config,
110:                    boolean loadProperties) {
111:                config.setLoadPropertyFile(loadProperties);
112:            }
113:
114:            /**
115:             * Proxy to EnvironmentConfig.setCreateUP()
116:             */
117:            public static void setCreateUP(EnvironmentConfig config,
118:                    boolean checkpointUP) {
119:                config.setCreateUP(checkpointUP);
120:            }
121:
122:            /**
123:             * Proxy to EnvironmentConfig.getCreateUP()
124:             */
125:            public static boolean getCreateUP(EnvironmentConfig config) {
126:                return config.getCreateUP();
127:            }
128:
129:            /**
130:             * Proxy to EnvironmentConfig.setCheckpointUP()
131:             */
132:            public static void setCheckpointUP(EnvironmentConfig config,
133:                    boolean checkpointUP) {
134:                config.setCheckpointUP(checkpointUP);
135:            }
136:
137:            /**
138:             * Proxy to EnvironmentConfig.getCheckpointUP()
139:             */
140:            public static boolean getCheckpointUP(EnvironmentConfig config) {
141:                return config.getCheckpointUP();
142:            }
143:
144:            /**
145:             * Proxy to EnvironmentConfig.setTxnReadCommitted()
146:             */
147:            public static void setTxnReadCommitted(EnvironmentConfig config,
148:                    boolean txnReadCommitted) {
149:                config.setTxnReadCommitted(txnReadCommitted);
150:            }
151:
152:            /**
153:             * Proxy to EnvironmentConfig.setTxnReadCommitted()
154:             */
155:            public static boolean getTxnReadCommitted(EnvironmentConfig config) {
156:                return config.getTxnReadCommitted();
157:            }
158:
159:            /**
160:             * Proxy to EnvironmentConfig.cloneConfig()
161:             */
162:            public static EnvironmentConfig cloneConfig(EnvironmentConfig config) {
163:                return config.cloneConfig();
164:            }
165:
166:            /**
167:             * Proxy to EnvironmentMutableConfig.cloneMutableConfig()
168:             */
169:            public static EnvironmentMutableConfig cloneMutableConfig(
170:                    EnvironmentMutableConfig config) {
171:                return config.cloneMutableConfig();
172:            }
173:
174:            /**
175:             * Proxy to EnvironmentMutableConfig.checkImmutablePropsForEquality()
176:             */
177:            public static void checkImmutablePropsForEquality(
178:                    EnvironmentMutableConfig config,
179:                    EnvironmentMutableConfig passedConfig)
180:                    throws IllegalArgumentException {
181:
182:                config.checkImmutablePropsForEquality(passedConfig);
183:            }
184:
185:            /**
186:             * Proxy to EnvironmentMutableConfig.copyMutablePropsTo()
187:             */
188:            public static void copyMutablePropsTo(
189:                    EnvironmentMutableConfig config,
190:                    EnvironmentMutableConfig toConfig) {
191:                config.copyMutablePropsTo(toConfig);
192:            }
193:
194:            /**
195:             * Proxy to EnvironmentMutableConfig.validateParams.
196:             */
197:            public static void disableParameterValidation(
198:                    EnvironmentMutableConfig config) {
199:                config.setValidateParams(false);
200:            }
201:
202:            /**
203:             * Proxy to EnvironmentMutableConfig.getProps
204:             */
205:            public static Properties getProps(EnvironmentMutableConfig config) {
206:                return config.getProps();
207:            }
208:
209:            /**
210:             * Proxy to DatabaseConfig.setUseExistingConfig()
211:             */
212:            public static void setUseExistingConfig(DatabaseConfig config,
213:                    boolean useExistingConfig) {
214:                config.setUseExistingConfig(useExistingConfig);
215:            }
216:
217:            /**
218:             * Proxy to DatabaseConfig.match(DatabaseConfig()
219:             */
220:            public static void databaseConfigValidate(DatabaseConfig config1,
221:                    DatabaseConfig config2) throws DatabaseException {
222:
223:                config1.validate(config2);
224:            }
225:
226:            /**
227:             * Proxy to Transaction.getLocker()
228:             */
229:            public static Locker getLocker(Transaction txn)
230:                    throws DatabaseException {
231:
232:                return txn.getLocker();
233:            }
234:
235:            /**
236:             * Proxy to Environment.getDefaultTxnConfig()
237:             */
238:            public static TransactionConfig getDefaultTxnConfig(Environment env) {
239:                return env.getDefaultTxnConfig();
240:            }
241:
242:            /**
243:             * Get an Environment only if the environment is already open. This
244:             * will register this Enviroment in the EnvironmentImpl's reference count,
245:             * but will not configure the environment.
246:             * @return null if the environment is not already open.
247:             */
248:            public static Environment getEnvironmentShell(File environmentHome) {
249:
250:                Environment env = null;
251:                try {
252:                    env = new Environment(environmentHome);
253:
254:                    /* If the environment is not already open, return a null. */
255:                    if (env.getEnvironmentImpl() == null) {
256:                        env = null;
257:                    }
258:                } catch (DatabaseException e) {
259:
260:                    /*
261:                     * Klockwork - ok
262:                     * the environment is not valid.
263:                     */
264:                }
265:                return env;
266:            }
267:
268:            public static RunRecoveryException makeNoArgsRRE() {
269:                return new RunRecoveryException();
270:            }
271:
272:            public static ExceptionEvent makeExceptionEvent(Exception e,
273:                    String n) {
274:                return new ExceptionEvent(e, n);
275:            }
276:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.