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


001:        /*
002:
003:           Derby - Class org.apache.derby.iapi.store.raw.log.Logger
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.raw.log;
023:
024:        import org.apache.derby.iapi.store.raw.RawStoreFactory;
025:        import org.apache.derby.iapi.store.raw.Loggable;
026:        import org.apache.derby.iapi.store.raw.Compensation;
027:
028:        import org.apache.derby.iapi.store.raw.xact.RawTransaction;
029:        import org.apache.derby.iapi.store.raw.xact.TransactionFactory;
030:        import org.apache.derby.iapi.store.raw.xact.TransactionId;
031:
032:        import org.apache.derby.iapi.store.raw.data.DataFactory;
033:
034:        import org.apache.derby.iapi.error.StandardException;
035:
036:        import org.apache.derby.iapi.services.io.LimitObjectInput;
037:
038:        public interface Logger {
039:
040:            /**
041:            	Log the loggable operation under the context of the transaction and then
042:            	apply the operation to the RawStore.
043:
044:            	<BR>
045:            	Before you call this method, make sure that the Loggable's doMe
046:            	method will succeed.  This method will go ahead and send the log record
047:            	to disk, and once it does that, then doMe cannot fail or the system
048:            	will be shut down and recovery may fail.  So it is <B> very important 
049:            	</B> to make sure that every resource you need for the loggable's doMe
050:            	method, such as disk space, has be acquired or accounted for before
051:            	calling logAndDo.
052:
053:            	@param xact		the transaction that is affecting the change
054:            	@param operation	the loggable operation that describes the change
055:            	@return LogInstant that is the LogInstant of the loggable operation 
056:
057:            	@exception StandardException	Standard Cloudscape error policy
058:             */
059:            public LogInstant logAndDo(RawTransaction xact, Loggable operation)
060:                    throws StandardException;
061:
062:            /**
063:            	Log the compensation operation under the context of the transaction 
064:                and then apply the undo to the RawStore.
065:
066:            	<BR>
067:            	Before you call this method, make sure that the Compensation's doMe
068:            	method will succeed.  This method will go ahead and send the log record
069:            	to disk, and once it does that, then doMe cannot fail or the system
070:            	will be shut down and recovery may fail.  So it is <B> very important 
071:            	</B> to make sure that every resource you need for the Compensation's 
072:                doMe method, such as disk space, has be acquired or accounted for before
073:            	calling logAndUnDo.
074:
075:            	@param xact		the transaction that is affecting the undo
076:            	@param operation	the compensation operation
077:            	@param undoInstant	the logInstant of the change that is to be undone
078:            	@param in			optional data
079:
080:            	@return LogInstant that is the LogInstant of the compensation operation
081:
082:            	@exception StandardException	Standard Cloudscape error policy
083:             */
084:            public LogInstant logAndUndo(RawTransaction xact,
085:                    Compensation operation, LogInstant undoInstant,
086:                    LimitObjectInput in) throws StandardException;
087:
088:            /**
089:            	Flush all unwritten log record up to the log instance indicated to disk.
090:
091:            	@param where flush log up to here
092:
093:            	@exception StandardException cannot flush due to sync error
094:             */
095:            public void flush(LogInstant where) throws StandardException;
096:
097:            /**
098:            	Flush all unwritten log to disk
099:
100:            	@exception StandardException cannot flush due to sync error
101:             */
102:            public void flushAll() throws StandardException;
103:
104:            /**
105:             * During recovery re-prepare a transaction.
106:             * <p>
107:             * After redo() and undo(), this routine is called on all outstanding 
108:             * in-doubt (prepared) transactions.  This routine re-acquires all 
109:             * logical write locks for operations in the xact, and then modifies
110:             * the transaction table entry to make the transaction look as if it
111:             * had just been prepared following startup after recovery.
112:             * <p>
113:             *
114:             * @param t             is the transaction performing the re-prepare
115:             * @param undoId        is the transaction ID to be re-prepared
116:             * @param undoStopAt    is where the log instant (inclusive) where the 
117:             *                      re-prepare should stop.
118:             * @param undoStartAt   is the log instant (inclusive) where re-prepare 
119:             *                      should begin, this is normally the log instant of 
120:             *                      the last log record of the transaction that is to 
121:             *                      be re-prepare.  If null, then re-prepare starts 
122:             *                      from the end of the log.
123:             *
124:             * @exception  StandardException  Standard exception policy.
125:             **/
126:            public void reprepare(RawTransaction t, TransactionId undoId,
127:                    LogInstant undoStopAt, LogInstant undoStartAt)
128:                    throws StandardException;
129:
130:            /**
131:              Undo transaction.
132:
133:              @param t is the transaction performing the rollback
134:              @param undoId is the transaction ID to be rolled back
135:              @param undoStopAt is where the log instant (inclusive) where 
136:            			the rollback should stop.
137:              @param undoStartAt is the log instant (inclusive) where rollback
138:            			should begin, this is normally the log instant of 
139:            			the last log record of the transaction that is 
140:            			to be rolled back.  
141:            			If null, then rollback starts from the end of the log.
142:
143:            	@exception StandardException	Standard Cloudscape error policy
144:             */
145:            public void undo(RawTransaction t, TransactionId undoId,
146:                    LogInstant undoStopAt, LogInstant undoStartAt)
147:                    throws StandardException;
148:        }
w_w___w___.ja_v_a__2s_.__c__o___m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.