The allocation cache contains an array of AllocExtents and 3 arrays of longs:
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
| Modifier and Type | Field and Description |
|---|---|
| private long[] | |
| private AllocExtent[] | |
| private long[] | |
| private boolean[] | |
| private boolean | |
| private long[] | |
| private int |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| protected long | getAllocPageNumber(BaseContainerHandle handle, long pageNumber, long firstAllocPageNumber)
Get the page number for the allocation page that is managing this page number |
| protected SpaceInformation | |
| protected long | getEstimatedPageCount(BaseContainerHandle handle, long firstAllocPageNumber)
returns estimated number of allocated pages |
| protected long | getLastPageNumber(BaseContainerHandle handle, long firstAllocPageNumber)
Get the last (allocated) page of the container |
| protected long | getLastValidPage(BaseContainerHandle handle, long firstAllocPageNumber)
Get the last valid page of the file container. |
| protected long | |
| protected int | getPageStatus(BaseContainerHandle handle, long pageNumber, long firstAllocPageNumber)
Get the page status of a page |
| protected long | |
| private void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| private void | |
| protected void | |
| private void | validate(BaseContainerHandle handle, long firstAllocPageNumber)
Validate the cache, find all alloc pages and fill in the arrays |
| extentPageNums | back to summary |
|---|---|
| private long[] extentPageNums | |
| extents | back to summary |
|---|---|
| private AllocExtent[] extents | |
| hiRange | back to summary |
|---|---|
| private long[] hiRange | |
| isDirty | back to summary |
|---|---|
| private boolean[] isDirty | |
| isValid | back to summary |
|---|---|
| private boolean isValid | |
| lowRange | back to summary |
|---|---|
| private long[] lowRange | |
| numExtents | back to summary |
|---|---|
| private int numExtents | |
| AllocationCache | back to summary |
|---|---|
| protected AllocationCache() | |
| dumpAllocationCache | back to summary |
|---|---|
| protected void dumpAllocationCache() dump the allocation cache information | |
| getAllocPageNumber | back to summary |
|---|---|
| protected long getAllocPageNumber(BaseContainerHandle handle, long pageNumber, long firstAllocPageNumber) throws StandardException Get the page number for the allocation page that is managing this page number | |
| getAllPageCounts | back to summary |
|---|---|
| protected SpaceInformation getAllPageCounts(BaseContainerHandle handle, long firstAllocPageNumber) throws StandardException | |
| getEstimatedPageCount | back to summary |
|---|---|
| protected long getEstimatedPageCount(BaseContainerHandle handle, long firstAllocPageNumber) throws StandardException returns estimated number of allocated pages | |
| getLastPageNumber | back to summary |
|---|---|
| protected long getLastPageNumber(BaseContainerHandle handle, long firstAllocPageNumber) throws StandardException Get the last (allocated) page of the container | |
| getLastValidPage | back to summary |
|---|---|
| protected long getLastValidPage(BaseContainerHandle handle, long firstAllocPageNumber) throws StandardException Get the last valid page of the file container. A valid page is one that is not deallocated or freed. | |
| getNextValidPage | back to summary |
|---|---|
| protected long getNextValidPage(BaseContainerHandle handle, long pageNumber, long firstAllocPageNumber) throws StandardException | |
| getPageStatus | back to summary |
|---|---|
| protected int getPageStatus(BaseContainerHandle handle, long pageNumber, long firstAllocPageNumber) throws StandardException Get the page status of a page | |
| getUnfilledPageNumber | back to summary |
|---|---|
| protected long getUnfilledPageNumber(BaseContainerHandle handle, long firstAllocPageNumber, long pagenum) throws StandardException | |
| growArrays | back to summary |
|---|---|
| private void growArrays(int size) | |
| invalidate | back to summary |
|---|---|
| protected void invalidate() | |
| invalidate | back to summary |
|---|---|
| protected void invalidate(AllocPage allocPage, long allocPagenum) throws StandardException | |
| invalidateLastExtent | back to summary |
|---|---|
| protected void invalidateLastExtent() | |
| reset | back to summary |
|---|---|
| protected void reset() | |
| setArrays | back to summary |
|---|---|
| private void setArrays(int i, AllocPage allocPage) | |
| trackUnfilledPage | back to summary |
|---|---|
| protected void trackUnfilledPage(long pagenumber, boolean unfilled) Set the page number to be unfilled | |
| validate | back to summary |
|---|---|
| private void validate(BaseContainerHandle handle, long firstAllocPageNumber) throws StandardException Validate the cache, find all alloc pages and fill in the arrays | |