Java Doc for ContainerOperation.java in  » Database-DBMS » db-derby-10.2 » org » apache » derby » impl » store » raw » data » 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.impl.store.raw.data 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.derby.impl.store.raw.data.ContainerBasicOperation
      org.apache.derby.impl.store.raw.data.ContainerOperation

ContainerOperation
public class ContainerOperation extends ContainerBasicOperation implements Undoable(Code)
Log operation to create, drop or remove a container. Both the doMe or the undoMe of a create actually caused the container header to be modified and flushed before the log record is flushed. This is necessary for 2 reasons, one is that of ensuring enough disk space, and the other is because unlike any other operation, the log record create container is in the log stream before the container is in the container cache. What this mean is that if a checkpoint started after the container operation but before the container is kept or is dirtied in the container cache, then checkpoint will not know to wait for the container to be kept or cleaned. The checkpoint will erroneous assume that the operation does not need to be redone since its log instant is before the checkpoint but in fact the change has not been flushed to disk. A drop or remove container does not have this problem. The container exist and is in kept state when the operation is logged so the checkpoint will not overlook it and it doesn't need to flush the container header. In the case of remove, the stub is flushed for a different reason - that of ensuring disk space.


Field Summary
final protected static  byteCREATE
    
final protected static  byteDROP
    
final protected static  byteREMOVE
    
protected  ByteArraycreateByteArray
    
protected transient  booleanhasCreateByteArray
    
protected  byteoperation
    

Constructor Summary
protected  ContainerOperation(RawContainerHandle hdl, byte operation)
    
public  ContainerOperation()
    

Method Summary
final public  voiddoMe(Transaction tran, LogInstant instant, LimitObjectInput in)
    
protected  RawContainerHandlefindContainerForRedoRecovery(RawTransaction xact)
     Find container for load tran.

If we are in load tran, and the operation is a create, the container may not (should not?) exist yet.

public  CompensationgenerateUndo(Transaction tran, LimitObjectInput in)
    
public  intgetTypeFormatId()
     Return my format identifier.
public  voidreadExternal(ObjectInput in)
    
public  StringtoString()
    
public  voidundoMe(Transaction tran, RawContainerHandle hdl, LogInstant CLRInstant, LimitObjectInput in)
     Undo of create, drop or remove
Parameters:
  tran - the transaction that is undoing this operation
Parameters:
  hdl - the container handle.
public  voidwriteExternal(ObjectOutput out)
    

Field Detail
CREATE
final protected static byte CREATE(Code)



DROP
final protected static byte DROP(Code)



REMOVE
final protected static byte REMOVE(Code)



createByteArray
protected ByteArray createByteArray(Code)



hasCreateByteArray
protected transient boolean hasCreateByteArray(Code)



operation
protected byte operation(Code)




Constructor Detail
ContainerOperation
protected ContainerOperation(RawContainerHandle hdl, byte operation) throws StandardException(Code)



ContainerOperation
public ContainerOperation()(Code)




Method Detail
doMe
final public void doMe(Transaction tran, LogInstant instant, LimitObjectInput in) throws StandardException(Code)

exception:
  StandardException - Standard Cloudscape error policy



findContainerForRedoRecovery
protected RawContainerHandle findContainerForRedoRecovery(RawTransaction xact) throws StandardException(Code)
Find container for load tran.

If we are in load tran, and the operation is a create, the container may not (should not?) exist yet. We need to recreate it.
exception:
  StandardException - Standard Cloudscape policy.




generateUndo
public Compensation generateUndo(Transaction tran, LimitObjectInput in) throws StandardException(Code)

See Also:   org.apache.derby.iapi.store.raw.Undoable
exception:
  StandardException - Standard Cloudscape error policy



getTypeFormatId
public int getTypeFormatId()(Code)
Return my format identifier.



readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)

exception:
  IOException - cannot read log record from log stream
exception:
  ClassNotFoundException - cannot read ByteArray object



toString
public String toString()(Code)
debug



undoMe
public void undoMe(Transaction tran, RawContainerHandle hdl, LogInstant CLRInstant, LimitObjectInput in) throws StandardException(Code)
Undo of create, drop or remove
Parameters:
  tran - the transaction that is undoing this operation
Parameters:
  hdl - the container handle. This is found here during runtimeundo - in which case we made the CLR and passed in the containerHdlfound in generateUndo and it is passed back to this; or it is found inthe CLR's needsRedo and is passed in and this operation never found thecontainer. Either case, release resource at the end is safe
Parameters:
  CLRInstant - the log instant of the CLR
Parameters:
  in - optional data
exception:
  StandardException - Standard Cloudscape error policy



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)



Fields inherited from org.apache.derby.impl.store.raw.data.ContainerBasicOperation
protected transient RawContainerHandle containerHdl(Code)(Java Doc)
protected ContainerKey containerId(Code)(Java Doc)

Methods inherited from org.apache.derby.impl.store.raw.data.ContainerBasicOperation
protected RawContainerHandle findContainer(Transaction tran) throws StandardException(Code)(Java Doc)
protected RawContainerHandle findContainerForRedoRecovery(RawTransaction tran) throws StandardException(Code)(Java Doc)
public ByteArray getPreparedLog()(Code)(Java Doc)
public int group()(Code)(Java Doc)
public boolean needsRedo(Transaction xact) throws StandardException(Code)(Java Doc)
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)(Java Doc)
public void releaseResource(Transaction tran)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public void writeExternal(ObjectOutput out) throws IOException(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

w__ww_.__j___av___a__2__s_.com__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.