public class UsageMap extends Object
Modifier and Type | Class and Description |
---|---|
class |
UsageMap.PageCursor
Utility class to traverse over the pages in the UsageMap.
|
Modifier and Type | Field and Description |
---|---|
static byte |
MAP_TYPE_INLINE
Inline map type
|
static byte |
MAP_TYPE_REFERENCE
Reference map type, for maps that are too large to fit inline
|
Modifier and Type | Method and Description |
---|---|
void |
addPageNumber(int pageNumber)
Add a page number to this usage map
|
protected int |
bitIndexToPageNumber(int bitIndex,
int invalidPageNumber) |
protected void |
clearTableAndPages() |
boolean |
containsPageNumber(int pageNumber)
Determines if the given page number is contained in this map.
|
UsageMap.PageCursor |
cursor() |
DatabaseImpl |
getDatabase() |
protected int |
getEndPage() |
protected int |
getFirstPageNumber() |
JetFormat |
getFormat() |
protected int |
getLastPageNumber() |
protected int |
getNextBitIndex(int curIndex) |
protected int |
getNextPageNumber(int curPage) |
PageChannel |
getPageChannel() |
int |
getPageCount() |
protected BitSet |
getPageNumbers() |
protected int |
getPrevBitIndex(int curIndex) |
protected int |
getPrevPageNumber(int curPage) |
protected int |
getRowEnd() |
protected short |
getRowStart() |
protected int |
getStartOffset() |
protected int |
getStartPage() |
protected ByteBuffer |
getTableBuffer() |
protected int |
getTablePageNumber() |
protected boolean |
isPageWithinRange(int pageNumber) |
protected int |
pageNumberToBitIndex(int pageNumber) |
protected void |
processMap(ByteBuffer buffer,
int bufferStartPage)
Read in the page numbers in this inline map
|
static UsageMap |
read(DatabaseImpl database,
ByteBuffer buf,
boolean assumeOutOfRangeBitsOn) |
static UsageMap |
read(DatabaseImpl database,
int pageNum,
int rowNum,
boolean assumeOutOfRangeBitsOn) |
protected void |
removePageNumber(int pageNumber,
boolean force)
Remove a page number from this usage map
|
protected void |
setPageRange(int newStartPage,
int newEndPage) |
protected void |
setStartOffset(int startOffset) |
String |
toString() |
protected void |
updateMap(int absolutePageNumber,
int bufferRelativePageNumber,
ByteBuffer buffer,
boolean add,
boolean force) |
protected void |
writeTable() |
public static final byte MAP_TYPE_INLINE
public static final byte MAP_TYPE_REFERENCE
public DatabaseImpl getDatabase()
public JetFormat getFormat()
public PageChannel getPageChannel()
public static UsageMap read(DatabaseImpl database, ByteBuffer buf, boolean assumeOutOfRangeBitsOn) throws IOException
database
- database that contains this usage mapbuf
- buffer which contains the usage map row infoIOException
public static UsageMap read(DatabaseImpl database, int pageNum, int rowNum, boolean assumeOutOfRangeBitsOn) throws IOException
database
- database that contains this usage mappageNum
- Page number that this usage map is contained inrowNum
- Number of the row on the page that contains this usage mapIOException
public UsageMap.PageCursor cursor()
public int getPageCount()
protected short getRowStart()
protected int getRowEnd()
protected void setStartOffset(int startOffset)
protected int getStartOffset()
protected ByteBuffer getTableBuffer()
protected int getTablePageNumber()
protected int getStartPage()
protected int getEndPage()
protected BitSet getPageNumbers()
protected void setPageRange(int newStartPage, int newEndPage)
protected boolean isPageWithinRange(int pageNumber)
protected int getFirstPageNumber()
protected int getNextPageNumber(int curPage)
protected int getNextBitIndex(int curIndex)
protected int getLastPageNumber()
protected int getPrevPageNumber(int curPage)
protected int getPrevBitIndex(int curIndex)
protected int bitIndexToPageNumber(int bitIndex, int invalidPageNumber)
protected int pageNumberToBitIndex(int pageNumber)
protected void clearTableAndPages()
protected void writeTable() throws IOException
IOException
protected void processMap(ByteBuffer buffer, int bufferStartPage)
public boolean containsPageNumber(int pageNumber)
public void addPageNumber(int pageNumber) throws IOException
IOException
protected void removePageNumber(int pageNumber, boolean force) throws IOException
IOException
protected void updateMap(int absolutePageNumber, int bufferRelativePageNumber, ByteBuffer buffer, boolean add, boolean force) throws IOException
IOException
Copyright © 2005–2018. All rights reserved.