Source Code Cross Referenced for TransactionManager.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » iapi » store » access » conglomerate » 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 » db derby 10.2 » org.apache.derby.iapi.store.access.conglomerate 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:
003:           Derby - Class org.apache.derby.iapi.store.access.conglomerate.TransactionManager
004:
005:           Licensed to the Apache Software Foundation (ASF) under one or more
006:           contributor license agreements.  See the NOTICE file distributed with
007:           this work for additional information regarding copyright ownership.
008:           The ASF licenses this file to you under the Apache License, Version 2.0
009:           (the "License"); you may not use this file except in compliance with
010:           the License.  You may obtain a copy of the License at
011:
012:              http://www.apache.org/licenses/LICENSE-2.0
013:
014:           Unless required by applicable law or agreed to in writing, software
015:           distributed under the License is distributed on an "AS IS" BASIS,
016:           WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017:           See the License for the specific language governing permissions and
018:           limitations under the License.
019:
020:         */
021:
022:        package org.apache.derby.iapi.store.access.conglomerate;
023:
024:        import org.apache.derby.iapi.services.daemon.Serviceable;
025:        import org.apache.derby.iapi.store.access.AccessFactory;
026:        import org.apache.derby.iapi.store.access.ConglomerateController;
027:        import org.apache.derby.iapi.store.access.SortController;
028:        import org.apache.derby.iapi.store.access.TransactionController;
029:        import org.apache.derby.iapi.store.raw.LockingPolicy;
030:        import org.apache.derby.iapi.store.raw.Page;
031:        import org.apache.derby.iapi.store.raw.Transaction;
032:        import org.apache.derby.iapi.error.StandardException;
033:
034:        /**
035:
036:         The TransactionManager interface provides methods on the transaction needed
037:         by an access method implementer, but should not be visible to clients of a
038:         TransactionController.
039:         <p>
040:         @see TransactionController
041:
042:         **/
043:
044:        public interface TransactionManager extends TransactionController {
045:
046:            /**
047:             * Constant used for the lock_level argument to openConglomerate() and 
048:             * openScan() calls.  Pass in MODE_NONE if you want no table or row locks.
049:             * This is currently only supported from within access.
050:             **/
051:            static final int MODE_NONE = 5;
052:
053:            /**
054:             * release lock immediately after getting lock.
055:             **/
056:            public static final int LOCK_INSTANT_DURATION = 1;
057:            /**
058:             * hold lock until end of transaction.
059:             **/
060:            public static final int LOCK_COMMIT_DURATION = 2;
061:            /**
062:             * Allow lock to be released manually prior to end transaction.
063:             **/
064:            public static final int LOCK_MANUAL_DURATION = 3;
065:
066:            /**
067:             * Add to the list of post commit work.
068:             * <p>
069:             * Add to the list of post commit work that may be processed after this
070:             * transaction commits.  If this transaction aborts, then the post commit
071:             * work list will be thrown away.  No post commit work will be taken out
072:             * on a rollback to save point.
073:             * <p>
074:             * This routine simply delegates the work to the Rawstore transaction.
075:             *
076:             * @param work  The post commit work to do.
077:             *
078:             **/
079:            public void addPostCommitWork(Serviceable work);
080:
081:            /**
082:             * The ScanManager.close() method has been called on "scan".
083:             * <p>
084:             * Take whatever cleanup action is appropriate to a closed scan.  It is
085:             * likely this routine will remove references to the scan object that it
086:             * was maintaining for cleanup purposes.
087:             *
088:             **/
089:            public void closeMe(ScanManager scan);
090:
091:            /**
092:             * The ConglomerateController.close() method has been called on 
093:             * "conglom_control".
094:             * <p>
095:             * Take whatever cleanup action is appropriate to a closed 
096:             * conglomerateController.  It is likely this routine will remove
097:             * references to the ConglomerateController object that it was maintaining
098:             * for cleanup purposes.
099:             **/
100:            public void closeMe(ConglomerateController conglom_control);
101:
102:            /**
103:             * The SortController.close() method has been called on "sort_control".
104:             * <p>
105:             * Take whatever cleanup action is appropriate to a closed 
106:             * sortController.  It is likely this routine will remove
107:             * references to the SortController object that it was maintaining
108:             * for cleanup purposes.
109:             **/
110:            public void closeMe(SortController sort_control);
111:
112:            /**
113:             * Get reference to access factory which started this transaction.
114:             * <p>
115:             *
116:             * @return The AccessFactory which started this transaction.
117:             **/
118:            public AccessFactory getAccessManager();
119:
120:            /**
121:             * Get an Internal transaction.
122:             * <p>
123:             * Start an internal transaction.  An internal transaction is a completely
124:             * separate transaction from the current user transaction.  All work done
125:             * in the internal transaction must be physical (ie. it can be undone 
126:             * physically by the rawstore at the page level, rather than logically 
127:             * undone like btree insert/delete operations).  The rawstore guarantee's
128:             * that in the case of a system failure all open Internal transactions are
129:             * first undone in reverse order, and then other transactions are undone
130:             * in reverse order.
131:             * <p>
132:             * Internal transactions are meant to implement operations which, if 
133:             * interupted before completion will cause logical operations like tree
134:             * searches to fail.  This special undo order insures that the state of
135:             * the tree is restored to a consistent state before any logical undo 
136:             * operation which may need to search the tree is performed.
137:             * <p>
138:             *
139:             * @return The new internal transaction.
140:             *
141:             * @exception  StandardException  Standard exception policy.
142:             **/
143:            public TransactionManager getInternalTransaction()
144:                    throws StandardException;
145:
146:            /**
147:             * Get the Transaction from the Transaction manager.
148:             * <p>
149:             * Access methods often need direct access to the "Transaction" - ie. the
150:             * raw store transaction, so give access to it.
151:             *
152:             * @return The raw store transaction.
153:             *
154:             * @exception  StandardException  Standard exception policy.
155:             **/
156:            public Transaction getRawStoreXact() throws StandardException;
157:
158:            /**
159:             * Do work necessary to maintain the current position in all the scans.
160:             * <p>
161:             * The latched page in the conglomerate "congomid" is changing, do
162:             * whatever is necessary to maintain the current position of all the
163:             * scans open in this transaction.
164:             * <p>
165:             * For some conglomerates this may be a no-op.
166:             * <p>
167:             *
168:             * @param conglom   Conglomerate object of the conglomerate being changed.
169:             * @param page      Page in the conglomerate being changed.
170:             *
171:             * @exception  StandardException  Standard exception policy.
172:             **/
173:            public void saveScanPositions(Conglomerate conglom, Page page)
174:                    throws StandardException;
175:        }
www.___j___av_a__2__s.__c_o__m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.