| java.lang.Object com.quadcap.sql.file.SubPage
SubPage | public class SubPage implements Page(Code) | | This class implements a page allocated by a sub-page allocator.
author: Stan Bailes |
Method Summary | |
public void | clear() | public void | decrRefCount() | public long | getPageNum() | public int | read(int pos, byte[] pbuf, int offset, int len) Read a range of bytes from the page. | public int | readInt(int pos) Read an integer (4-byte) value from the page. | public long | readLong(int pos) Read a long (8-byte) value from the page. | public void | takeData(Page p) Move the contents of the other page to this page, and zero out
the other page. | public String | toString() | public int | write(int pos, byte[] pbuf, int offset, int len) Write a range of bytes to the page. | public void | writeInt(int pos, int val) Write an integer (4-byte) value to the page. | public void | writeLong(int pos, long val) Write a long (8-byte) value to the page. |
pageOffset | int pageOffset(Code) | | |
clear | public void clear()(Code) | | |
decrRefCount | public void decrRefCount()(Code) | | |
getPageNum | public long getPageNum()(Code) | | Return this page's number
|
read | public int read(int pos, byte[] pbuf, int offset, int len)(Code) | | Read a range of bytes from the page.
Parameters: pos - the offset in the page of the first byte to read Parameters: pbuf - the buffer into which the bytes are placed. Parameters: offset - the offset in pbuf where the first byteis placed. Parameters: len - the number of bytes to read |
readInt | public int readInt(int pos)(Code) | | Read an integer (4-byte) value from the page.
Parameters: pos - the offset in the page of the integer. |
readLong | public long readLong(int pos)(Code) | | Read a long (8-byte) value from the page.
Parameters: pos - the offset in the page of the long. |
takeData | public void takeData(Page p)(Code) | | Move the contents of the other page to this page, and zero out
the other page.
|
write | public int write(int pos, byte[] pbuf, int offset, int len)(Code) | | Write a range of bytes to the page.
Parameters: pos - the offset in the page of the first byte to write Parameters: pbuf - the buffer from which the bytes are obtained Parameters: offset - the offset in pbuf of the first byteto write Parameters: len - the number of bytes to write |
writeInt | public void writeInt(int pos, int val)(Code) | | Write an integer (4-byte) value to the page.
Parameters: pos - the offset in the page of the integer. Parameters: val - the integer value to write. |
writeLong | public void writeLong(int pos, long val)(Code) | | Write a long (8-byte) value to the page.
Parameters: pos - the offset in the page of the long. Parameters: val - the long value to write. |
|
|