| 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 |
Method Summary | |
protected static int | MAX_RANGE(int availspace) | protected void | allocPage(long pagenum) | protected boolean | canAddFreePage(long lastAllocatedPage) | protected int | compress(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 void | compressPages(int new_highest_page, int num_pages_truncated) | protected void | deallocPage(long pagenum) Deallocate logical page pagenum - this is called underneath the log record. | protected int | getAllocatedPageCount() | protected long | getExtentEnd() | protected long | getFirstPagenum() Get the first logical page number managed by this extent. | protected long | getFreePageNumber(long pnum) | protected long | getLastPagenum() Get the last logical page number managed by this extent. | protected long | getLastPreallocPagenum() | protected long | getLastValidPageNumber() | protected long | getNextValidPageNumber(long prevPageNumber) | protected long | getPageOffset(long pagenum, int pagesize, boolean deallocOK) Get the physical offset of pagenum. | protected int | getPageStatus(long pagenum) | protected long | getPagenum(int bit_pos) translate bit position in map to page number. | protected int | getTotalPageCount() | protected int | getUnfilledPageCount() | protected long | getUnfilledPageNumber(long pagenum) Get a page number that is unfilled, pagenum is the last page that was
rejected. | protected boolean | isRetired() | public void | readExternal(ObjectInput in) | protected void | setLastPreallocPagenum(long preAllocPagenum) preallocated N pages, passed in the last preallocated page number. | protected String | toDebugString() | protected boolean | trackUnfilledPage(long pagenumber, boolean unfilled) | protected void | undoCompressPages(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 void | updateUnfilledPageInfo(AllocExtent inputExtent) | public void | writeExternal(ObjectOutput out) |
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) | | |
AllocExtent | protected AllocExtent(long offset, long start, int length, int pagesize, int maxlength)(Code) | | |
AllocExtent | public AllocExtent()(Code) | | |
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
|
setLastPreallocPagenum | protected void setLastPreallocPagenum(long preAllocPagenum)(Code) | | preallocated N pages, passed in the last preallocated page number.
|
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) | | |
|
|