Java Doc for AllocExtent.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.AllocExtent

AllocExtent
public class AllocExtent implements Externalizable(Code)
An allocation extent row manages the page status of page in the extent. AllocExtent is externalizable and is written to the AllocPage directly, without being converted to a row first.


See Also:   AllocPage


Field Summary
final protected static  intALLOCATED_PAGE
    
final protected static  intDEALLOCATED_PAGE
    
final protected static  intFREE_PAGE
    
 intextentStatus
    
 FormatableBitSetfreePages
    
 FormatableBitSetunFilledPages
    

Constructor Summary
protected  AllocExtent(long offset, long start, int length, int pagesize, int maxlength)
    
protected  AllocExtent(AllocExtent original)
    
public  AllocExtent()
    

Method Summary
protected static  intMAX_RANGE(int availspace)
    
protected  voidallocPage(long pagenum)
    
protected  booleancanAddFreePage(long lastAllocatedPage)
    
protected  intcompress(BaseContainerHandle owner, RawTransaction ntt, AllocPage alloc_page)
     Compress free pages at end of this extent.

Search backward from end of extent and prepare data structures to return pages at end of extent to the OS.

protected  voidcompressPages(int new_highest_page, int num_pages_truncated)
    
protected  voiddeallocPage(long pagenum)
     Deallocate logical page pagenum - this is called underneath the log record.
protected  intgetAllocatedPageCount()
    
protected  longgetExtentEnd()
    
protected  longgetFirstPagenum()
     Get the first logical page number managed by this extent.
protected  longgetFreePageNumber(long pnum)
    
protected  longgetLastPagenum()
     Get the last logical page number managed by this extent.
protected  longgetLastPreallocPagenum()
    
protected  longgetLastValidPageNumber()
    
protected  longgetNextValidPageNumber(long prevPageNumber)
    
protected  longgetPageOffset(long pagenum, int pagesize, boolean deallocOK)
     Get the physical offset of pagenum.
protected  intgetPageStatus(long pagenum)
    
protected  longgetPagenum(int bit_pos)
     translate bit position in map to page number.
protected  intgetTotalPageCount()
    
protected  intgetUnfilledPageCount()
    
protected  longgetUnfilledPageNumber(long pagenum)
     Get a page number that is unfilled, pagenum is the last page that was rejected.
protected  booleanisRetired()
    
public  voidreadExternal(ObjectInput in)
    
protected  voidsetLastPreallocPagenum(long preAllocPagenum)
     preallocated N pages, passed in the last preallocated page number.
protected  StringtoDebugString()
    
protected  booleantrackUnfilledPage(long pagenumber, boolean unfilled)
    
protected  voidundoCompressPages(int new_highest_page, int num_pages_truncated)
     Undo the compress space operation.

Undo of this operation doesn't really "undo" the operation, it just makes sure the data structures are ok after the undo.

protected  voidupdateUnfilledPageInfo(AllocExtent inputExtent)
    
public  voidwriteExternal(ObjectOutput out)
    

Field Detail
ALLOCATED_PAGE
final protected static int ALLOCATED_PAGE(Code)
public Per Page status



DEALLOCATED_PAGE
final protected static int DEALLOCATED_PAGE(Code)



FREE_PAGE
final protected static int FREE_PAGE(Code)



extentStatus
int extentStatus(Code)



freePages
FormatableBitSet freePages(Code)



unFilledPages
FormatableBitSet unFilledPages(Code)




Constructor Detail
AllocExtent
protected AllocExtent(long offset, long start, int length, int pagesize, int maxlength)(Code)



AllocExtent
protected AllocExtent(AllocExtent original)(Code)



AllocExtent
public AllocExtent()(Code)




Method Detail
MAX_RANGE
protected static int MAX_RANGE(int availspace)(Code)
Statically calculates how many pages this extent can manage given the availspace number of bytes to store this extent in if read/writeExternal changes, this must change too



allocPage
protected void allocPage(long pagenum) throws StandardException(Code)
Allocate this page - this is called underneath the log record
exception:
  StandardException - Standard Cloudscape error policy



canAddFreePage
protected boolean canAddFreePage(long lastAllocatedPage)(Code)



compress
protected int compress(BaseContainerHandle owner, RawTransaction ntt, AllocPage alloc_page) throws StandardException(Code)
Compress free pages at end of this extent.

Search backward from end of extent and prepare data structures to return pages at end of extent to the OS. Returns the lowest page that can be returned to the OS.

Return bit of page where all pages that follow canbe returned to the OS.




compressPages
protected void compressPages(int new_highest_page, int num_pages_truncated)(Code)



deallocPage
protected void deallocPage(long pagenum) throws StandardException(Code)
Deallocate logical page pagenum - this is called underneath the log record. pagenum must be a page managed by this extent and it must be valid
exception:
  StandardException - Standard Cloudscape error policy



getAllocatedPageCount
protected int getAllocatedPageCount()(Code)
Get the number of used page in this extent



getExtentEnd
protected long getExtentEnd()(Code)



getFirstPagenum
protected long getFirstPagenum()(Code)
Get the first logical page number managed by this extent.



getFreePageNumber
protected long getFreePageNumber(long pnum)(Code)
Get a page number that is free



getLastPagenum
protected long getLastPagenum()(Code)
Get the last logical page number managed by this extent.



getLastPreallocPagenum
protected long getLastPreallocPagenum()(Code)
get the last preallocated pagenumber managed by this alloc page



getLastValidPageNumber
protected long getLastValidPageNumber()(Code)



getNextValidPageNumber
protected long getNextValidPageNumber(long prevPageNumber)(Code)



getPageOffset
protected long getPageOffset(long pagenum, int pagesize, boolean deallocOK) throws StandardException(Code)
Get the physical offset of pagenum. If deallocOK is true, then even if pagenum is deallocated, it is OK. If deallocOK is false, then an exception is thrown if pagenum is deallocated. An exception is always thrown if pagenum is a free page
exception:
  StandardException - Standard Cloudscape error policy



getPageStatus
protected int getPageStatus(long pagenum)(Code)
Return the status of a particular page



getPagenum
protected long getPagenum(int bit_pos)(Code)
translate bit position in map to page number.

The page number of this "bit" in the extent map.
exception:
  StandardException - Standard exception policy.




getTotalPageCount
protected int getTotalPageCount()(Code)
Get the total number of pages in this extent



getUnfilledPageCount
protected int getUnfilledPageCount()(Code)
Get the number of unfilled pages in this extent



getUnfilledPageNumber
protected long getUnfilledPageNumber(long pagenum)(Code)
Get a page number that is unfilled, pagenum is the last page that was rejected.



isRetired
protected boolean isRetired()(Code)
Return the status of this extent



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



setLastPreallocPagenum
protected void setLastPreallocPagenum(long preAllocPagenum)(Code)
preallocated N pages, passed in the last preallocated page number.



toDebugString
protected String toDebugString()(Code)



trackUnfilledPage
protected boolean trackUnfilledPage(long pagenumber, boolean unfilled)(Code)



undoCompressPages
protected void undoCompressPages(int new_highest_page, int num_pages_truncated)(Code)
Undo the compress space operation.

Undo of this operation doesn't really "undo" the operation, it just makes sure the data structures are ok after the undo. We are guaranteed at the point of the transaction doing the Undo of the compress space operation fixes up the bit maps to only point at pages within the new_highest_page range.

Prior to logging the compress space operation all pages greater than There are only 2 possibilities at this point: 1) the truncate of pages greater than new_highest_page happened before the abort took place. W 2)
exception:
  StandardException - Standard exception policy.




updateUnfilledPageInfo
protected void updateUnfilledPageInfo(AllocExtent inputExtent)(Code)



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



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__w_w___.jav_a2__s._co__m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.