|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.storage.btree.Paged.PageHeader
public abstract static class Paged.PageHeader
Field Summary | |
---|---|
static int |
LENGTH_PAGE_DATA_LENGTH
|
static int |
LENGTH_PAGE_LSN
|
static int |
LENGTH_PAGE_NEXT_PAGE
|
static int |
LENGTH_PAGE_STATUS
|
Constructor Summary | |
---|---|
Paged.PageHeader()
|
|
Paged.PageHeader(byte[] data,
int offset)
|
Method Summary | |
---|---|
int |
getDataLen()
The length of the Data |
long |
getLsn()
Returns the LSN, i.e. |
long |
getNextPage()
The next page for this Record (if overflowed) |
byte |
getStatus()
The status of this page (UNUSED, RECORD, DELETED, etc...) - jmv - DESIGN_NOTE : 44 calls to this functions, mostly with switch; the "state" design pattern is appropriate to eliminate these non - object oriented switches, and put together all the behavior related to one state. |
boolean |
isDirty()
Gets the dirty attribute of the PageHeader object |
int |
read(byte[] data,
int offset)
|
void |
setDataLen(int dataLen)
The length of the Data |
void |
setDirty(boolean dirty)
|
void |
setLsn(long lsn)
|
void |
setNextPage(long nextPage)
The next page for this Record (if overflowed) |
void |
setStatus(byte status)
The status of this page (UNUSED, RECORD, DELETED, etc...) |
int |
write(byte[] data,
int offset)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int LENGTH_PAGE_STATUS
public static int LENGTH_PAGE_DATA_LENGTH
public static int LENGTH_PAGE_NEXT_PAGE
public static int LENGTH_PAGE_LSN
Constructor Detail |
---|
public Paged.PageHeader()
public Paged.PageHeader(byte[] data, int offset) throws IOException
IOException
Method Detail |
---|
public final int getDataLen()
public final long getNextPage()
public final byte getStatus()
public final boolean isDirty()
public final long getLsn()
public final void setLsn(long lsn)
public int read(byte[] data, int offset) throws IOException
IOException
public int write(byte[] data, int offset) throws IOException
IOException
public final void setDataLen(int dataLen)
dataLen
- The new dataLen valuepublic final void setDirty(boolean dirty)
public final void setNextPage(long nextPage)
nextPage
- The new nextPage valuepublic final void setStatus(byte status)
status
- The new status value
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |