| java.lang.Object org.apache.derby.impl.store.raw.data.AllocationCache
AllocationCache | class AllocationCache (Code) | | An auxiliary object to cache the allocation information for a file container.
Only a FileContainer should use this object
The allocation cache contains an array of AllocExtents and 3 arrays of longs:
- ExtentPageNums[i] is the page number of the i'th extent
- lowRange[i] is the smallest page number managed by extent i
- hiRange[i] is the largest page number managed by extent i
Note thate extentPageNums and lowRange does not change once the extent has
been created, but hiRange will change for the last extent as more pages are
allocated.
Extents can be individually invalidated or the entire cache (all extends)
can be invalidated at once.
MT - unsafe
Synrhonized access to all methods must be enforced by the caller of
AllocationCache
|
Method Summary | |
protected void | dumpAllocationCache() | protected SpaceInformation | getAllPageCounts(BaseContainerHandle handle, long firstAllocPageNumber) | protected long | getAllocPageNumber(BaseContainerHandle handle, long pageNumber, long firstAllocPageNumber) | protected long | getEstimatedPageCount(BaseContainerHandle handle, long firstAllocPageNumber) | protected long | getLastPageNumber(BaseContainerHandle handle, long firstAllocPageNumber) | protected long | getLastValidPage(BaseContainerHandle handle, long firstAllocPageNumber) Get the last valid page of the file container. | protected long | getNextValidPage(BaseContainerHandle handle, long pageNumber, long firstAllocPageNumber) | protected int | getPageStatus(BaseContainerHandle handle, long pageNumber, long firstAllocPageNumber) | protected long | getUnfilledPageNumber(BaseContainerHandle handle, long firstAllocPageNumber, long pagenum) | protected void | invalidate() | protected void | invalidate(AllocPage allocPage, long allocPagenum) | protected void | invalidateLastExtent() | protected void | reset() | protected void | trackUnfilledPage(long pagenumber, boolean unfilled) |
AllocationCache | protected AllocationCache()(Code) | | |
dumpAllocationCache | protected void dumpAllocationCache()(Code) | | dump the allocation cache information
|
getAllocPageNumber | protected long getAllocPageNumber(BaseContainerHandle handle, long pageNumber, long firstAllocPageNumber) throws StandardException(Code) | | Get the page number for the allocation page that is managing this page number
|
getLastValidPage | protected long getLastValidPage(BaseContainerHandle handle, long firstAllocPageNumber) throws StandardException(Code) | | Get the last valid page of the file container. A valid page is one that
is not deallocated or freed.
|
invalidate | protected void invalidate()(Code) | | |
invalidateLastExtent | protected void invalidateLastExtent()(Code) | | |
reset | protected void reset()(Code) | | |
trackUnfilledPage | protected void trackUnfilledPage(long pagenumber, boolean unfilled)(Code) | | Set the page number to be unfilled
|
|
|